0b585d1c98
* More liberal .gitignores on TS output directories * Use project references for Typescript functions project * Use /dist dir for Cloud Functions deployment payload * Fix Github actions functions tsc job
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Check PRs
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
FORCE_COLOR: 3
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
jobs:
|
|
check:
|
|
name: Static analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- 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 common
|
|
if: ${{ success() || failure() }}
|
|
working-directory: common
|
|
run: npx eslint . --max-warnings 0
|
|
- name: Run ESLint on web client
|
|
if: ${{ success() || failure() }}
|
|
working-directory: web
|
|
run: yarn lint --max-warnings 0
|
|
- name: Run ESLint on cloud functions
|
|
if: ${{ success() || failure() }}
|
|
working-directory: functions
|
|
run: npx eslint . --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 -b -v --pretty
|