Skip to content

chore(ci): modernize #1

chore(ci): modernize

chore(ci): modernize #1

Workflow file for this run

name: webpack-dev-server
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: Setup firefox
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@5914774dda97099441f02628f8d46411fcfbd208 # v1.7.0
with:
firefox-version: latest
- name: Link webpack-dev-server
run: |
cp -R client tmp-client
npm link --ignore-scripts || true
npm link webpack-dev-server --ignore-scripts || true
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
with:
files: ./coverage/lcov.info
- name: Upload test results to Codecov
if: always()
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: ./junit.xml
report_type: test_results