Add GitHub 'check' workflow to do static analysis (#286)
This commit is contained in:
parent
c5660ab762
commit
1ddfd41a18
49
.github/workflows/check.yml
vendored
Normal file
49
.github/workflows/check.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user