49 lines
1.4 KiB
YAML
49 lines
1.4 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 .
|
|
- name: Run ESLint on web client
|
|
if: ${{ success() || failure() }}
|
|
working-directory: web
|
|
run: yarn lint --max-warnings 0
|
|
- name: Run Typescript checker on web client
|
|
if: ${{ success() || failure() }}
|
|
working-directory: web
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|
|
- name: Run Typescript checker on cloud functions
|
|
if: ${{ success() || failure() }}
|
|
working-directory: functions
|
|
run: tsc --pretty --project tsconfig.json --noEmit
|