Add GitHub 'check' workflow to do static analysis (#286)

This commit is contained in:
Marshall Polaris 2022-05-21 12:42:59 -07:00 committed by GitHub
parent c5660ab762
commit 1ddfd41a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

49
.github/workflows/check.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Check PRs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
setup:
name: Set up test environment
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare Node environment
uses: actions/setup-node@v3
with:
node-version: latest
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
prettier:
needs: setup
name: Run Prettier
steps:
- run: npx prettier .
eslint:
needs: setup
name: Run ESLint on web client
steps:
- run: cd web && yarn lint
tsc-web:
needs: setup
name: Run Typescript checker on web client
steps:
- run: tsc --pretty --project web/tsconfig.json --noEmit
tsc-functions:
needs: setup
name: Run Typescript checker on cloud functions
steps:
- run: tsc --pretty --project functions/tsconfig.json --noEmit