Skip to content

Update jest monorepo #613

Update jest monorepo

Update jest monorepo #613

Workflow file for this run

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