2022-05-21 19:42:59 +00:00
|
|
|
name: Check PRs
|
|
|
|
|
2022-05-21 19:55:20 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-05-21 19:42:59 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
2022-05-21 19:51:31 +00:00
|
|
|
check:
|
|
|
|
name: Perform static analysis checks
|
2022-05-21 19:42:59 +00:00
|
|
|
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
|
2022-05-21 19:51:31 +00:00
|
|
|
- name: Run Prettier
|
2022-05-21 19:53:24 +00:00
|
|
|
run: npx prettier --check .
|
2022-05-21 19:51:31 +00:00
|
|
|
- name: Run ESLint on web client
|
|
|
|
run: cd web && yarn lint
|
|
|
|
- name: Run Typescript checker on web client
|
|
|
|
run: tsc --pretty --project web/tsconfig.json --noEmit
|
|
|
|
- name: Run Typescript checker on cloud functions
|
|
|
|
run: tsc --pretty --project functions/tsconfig.json --noEmit
|