Repository navigation
41 lines (37 loc) · 1.6 KB
/
Copy pathci.yml
File metadata and controls
41 lines (37 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
# Every PR and master push: the unit tests (with the quality check's own), the shipped typings, the build, the smoke
# tests of the built bundles in Chromium, and the npm package's file list. No path filter: a required check that never
# reports blocks the PR.
on:
pull_request:
push:
branches: [master]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: Test, build and pack
runs-on: ubuntu-latest
# The default is 360 minutes; a test that never exits must not burn them.
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
# Cloudflare Workers Builds, which deploys the CDN, installs with npm 10. npm 10 rejects a lockfile that npm 11
# accepts when an optional peer dependency is missing from it, and the deploy then fails without a red PR.
- name: Lockfile works with the CDN deploy's npm 10
run: npx -y npm@10.9.2 ci --ignore-scripts --dry-run --no-audit --no-fund
# `npm ci` runs `prepare`, which builds the bundles the smoke tests load.
- run: npm ci
- run: npm test
- run: npm run typecheck
- name: Install Chromium for the smoke tests
run: npx playwright install --with-deps --only-shell chromium
- run: npm run test:smoke
- run: npm pack --dry-run