chore: add improved CI workflow

This commit is contained in:
Corbin Crutchley
2022-09-25 05:51:10 -07:00
parent 3de26561ab
commit 53d14a00da
2 changed files with 36 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ name: test
on: push on: push
jobs: jobs:
test-lint-build: test:
env: env:
CI: true CI: true
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -19,7 +19,38 @@ jobs:
run: npm ci run: npm ci
- name: Test - 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 run: npm run lint

View File

@@ -26,7 +26,8 @@
"host:local": "cd dist && ws --http2 --compress", "host:local": "cd dist && ws --http2 --compress",
"format": "prettier -w . --cache --plugin-search-dir=.", "format": "prettier -w . --cache --plugin-search-dir=.",
"lint": "eslint . --ext .js,.ts,.astro", "lint": "eslint . --ext .js,.ts,.astro",
"tsc": "tsc --noEmit && astro check" "tsc": "tsc --noEmit && astro check",
"test": ""
}, },
"devDependencies": { "devDependencies": {
"@astrojs/image": "^0.7.1", "@astrojs/image": "^0.7.1",