Archived
1
0

refactor: delete lint, add typecheck job

This commit is contained in:
Joe Previte
2022-09-16 22:37:16 -07:00
parent 0b1cfc91d9
commit fe70ebf4d6
3 changed files with 44 additions and 17 deletions

View File

@ -60,10 +60,6 @@ jobs:
run: yarn fmt
if: success()
- name: Run yarn lint
run: yarn lint
if: success()
lint-sh:
name: Lint shell files
runs-on: ubuntu-latest
@ -108,6 +104,49 @@ jobs:
if: failure()
uses: andymckay/cancel-action@0.2
typecheck:
name: Check TypeScript types
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23.2
with:
files: |
./src/**/*
- name: Install Node.js v16
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-yarn
uses: actions/cache@v3
with:
path: "node_modules"
key: yarn-build-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-yarn.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run tsc on TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn typecheck
- name: Fail workflow
if: failure()
uses: andymckay/cancel-action@0.2
lint-ts:
name: Lint TypeScript files
runs-on: ubuntu-latest