From 53d14a00dabbe640d55df8c64eab99c8bfb9ca15 Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Sun, 25 Sep 2022 05:51:10 -0700 Subject: [PATCH] chore: add improved CI workflow --- .github/workflows/test.yml | 37 ++++++++++++++++++++++++++++++++++--- package.json | 3 ++- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22b422f5..78e7f381 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: test on: push jobs: - test-lint-build: + test: env: CI: true runs-on: ubuntu-latest @@ -19,7 +19,38 @@ jobs: run: npm ci - name: Test - run: npm test + run: npm run test + tsc: + env: + CI: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: npm - - name: Lint + - name: Install Dependencies + run: npm ci + + - name: Check TypeScript + run: npm run tsc + lint: + env: + CI: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Run Linting run: npm run lint diff --git a/package.json b/package.json index 5da32076..a4201c4e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "host:local": "cd dist && ws --http2 --compress", "format": "prettier -w . --cache --plugin-search-dir=.", "lint": "eslint . --ext .js,.ts,.astro", - "tsc": "tsc --noEmit && astro check" + "tsc": "tsc --noEmit && astro check", + "test": "" }, "devDependencies": { "@astrojs/image": "^0.7.1",