50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Check PRs
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
check:
|
|
name: Perform static analysis checks
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: Prepare Node environment
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: latest
|
|
cache: 'yarn'
|
|
- name: Restore cached node_modules
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: '**/node_modules'
|
|
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
|
|
- name: Install missing dependencies
|
|
run: yarn install --prefer-offline --frozen-lockfile
|
|
- name: Run Prettier on web client
|
|
working-directory: web
|
|
run: npx prettier --check .
|
|
continue-on-error: true
|
|
- name: Run ESLint on web client
|
|
working-directory: web
|
|
run: yarn lint --max-warnings 0
|
|
continue-on-error: true
|
|
- name: Run Typescript checker on web client
|
|
working-directory: web
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|
|
continue-on-error: true
|
|
- name: Run Typescript checker on cloud functions
|
|
working-directory: functions
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|
|
continue-on-error: true
|