Add manual workflow for coverage #6
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 | |
jobs: | |
audit: | |
runs-on: ubuntu-latest | |
name: Audit | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Audit dependencies | |
run: npm audit | |
format: | |
runs-on: ubuntu-latest | |
name: Format check | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Check formatting | |
run: npm run format | |
lint: | |
runs-on: ubuntu-latest | |
name: Linter | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint affected projects | |
run: npm run lint | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
name: Unit tests | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Run unit tests | |
run: npm run test | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build |