Skip to content

chore(ci): modernize #5

chore(ci): modernize

chore(ci): modernize #5

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
lint:
name: Lint & Check Types
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: "lts/*"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build types
run: npm run build:types
- name: Check types
run: |
if [ -n "$(git status types --porcelain)" ]; then
echo "Missing types. Update types by running 'npm run build:types'";
exit 1;
fi
test:
name: Test - ${{ matrix.os }} (Node.js ${{ matrix.node-version }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x, 22.x, 24.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Link webpack-dev-server
run: |
cp -R client tmp-client
npm link --ignore-scripts
npm link webpack-dev-server --ignore-scripts
rm -r client
cp -R tmp-client client
- name: Run tests
run: npm run test:coverage -- --ci
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2