Standardize to use npm ci
rather than npm install
#254
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: CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '.github/dependabot.yml' | |
- 'LICENSE' | |
- '.editorconfig' | |
- 'README.md' | |
- '.vscode/**' | |
pull_request: | |
paths-ignore: | |
- '.github/dependabot.yml' | |
- 'LICENSE' | |
- '.editorconfig' | |
- 'README.md' | |
- '.vscode/**' | |
jobs: | |
build: | |
timeout-minutes: 15 | |
needs: [typecheck] # Ensuring cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Build and Test | |
run: npm test | |
- name: Check no diff for products | |
run: git add --intent-to-add . && git diff --exit-code | |
typecheck: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- name: install dependencies | |
run: npm ci --ignore-scripts | |
- name: Typecheck | |
run: npm run typecheck | |
lint: | |
timeout-minutes: 15 | |
needs: [typecheck] # Ensuring cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- name: install dependencies | |
run: npm ci --ignore-scripts | |
- name: Lint | |
run: npm run lint:check |