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]
|
|
|
|
|
2022-05-21 21:01:29 +00:00
|
|
|
env:
|
|
|
|
FORCE_COLOR: 3
|
2022-05-21 21:04:14 +00:00
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
2022-05-21 21:01:29 +00:00
|
|
|
|
2022-05-21 19:42:59 +00:00
|
|
|
jobs:
|
2022-05-21 19:51:31 +00:00
|
|
|
check:
|
2022-05-21 21:01:29 +00:00
|
|
|
name: Static analysis
|
2022-05-21 19:42:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2022-05-21 20:08:16 +00:00
|
|
|
- name: Restore cached node_modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2022-05-21 20:23:29 +00:00
|
|
|
path: '**/node_modules'
|
2022-05-21 20:08:16 +00:00
|
|
|
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
- name: Install missing dependencies
|
2022-05-21 19:59:19 +00:00
|
|
|
run: yarn install --prefer-offline --frozen-lockfile
|
2022-05-21 20:11:28 +00:00
|
|
|
- name: Run Prettier on web client
|
|
|
|
working-directory: web
|
2022-05-21 19:53:24 +00:00
|
|
|
run: npx prettier --check .
|
2022-05-22 07:35:43 +00:00
|
|
|
- name: Run ESLint on common
|
|
|
|
if: ${{ success() || failure() }}
|
|
|
|
working-directory: common
|
|
|
|
run: npx eslint . --max-warnings 0
|
2022-05-21 19:51:31 +00:00
|
|
|
- name: Run ESLint on web client
|
2022-05-21 20:38:21 +00:00
|
|
|
if: ${{ success() || failure() }}
|
2022-05-21 20:11:28 +00:00
|
|
|
working-directory: web
|
2022-05-21 20:19:00 +00:00
|
|
|
run: yarn lint --max-warnings 0
|
2022-05-22 07:35:43 +00:00
|
|
|
- name: Run ESLint on cloud functions
|
|
|
|
if: ${{ success() || failure() }}
|
|
|
|
working-directory: functions
|
|
|
|
run: npx eslint . --max-warnings 0
|
2022-05-21 19:51:31 +00:00
|
|
|
- name: Run Typescript checker on web client
|
2022-05-21 20:38:21 +00:00
|
|
|
if: ${{ success() || failure() }}
|
2022-05-21 20:11:28 +00:00
|
|
|
working-directory: web
|
2022-06-27 17:30:22 +00:00
|
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|
2022-05-21 19:51:31 +00:00
|
|
|
- name: Run Typescript checker on cloud functions
|
2022-05-21 20:38:21 +00:00
|
|
|
if: ${{ success() || failure() }}
|
2022-05-21 20:11:28 +00:00
|
|
|
working-directory: functions
|
2022-06-27 17:30:22 +00:00
|
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|