Rebuild for speed and simplicity #622
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Enforce code quality | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3.5.1 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Cache ESLint results | |
id: cache-eslint | |
uses: actions/cache@v3 | |
env: | |
cache-name: eslint | |
with: | |
path: .cache/eslint | |
key: ${{ runner.os }}-quality-${{ env.cache-name }}-${{ hashFiles('.cache/eslint/*.*') }} | |
restore-keys: | | |
${{ runner.os }}-quality-${{ env.cache-name }}-${{ hashFiles('.cache/eslint/*.*') }} | |
- name: Lint source code | |
run: | | |
npm ci | |
npm run lint | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3.5.1 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Run static analysis and type-check source code | |
run: | | |
npm ci | |
npm run typecheck | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3.5.1 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Run tests | |
run: | | |
npm ci | |
npm test |