Repository navigation
55 lines (43 loc) · 1.61 KB
/
Copy pathci.yml
File metadata and controls
55 lines (43 loc) · 1.61 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v4
# This is a pnpm workspace. npm does not read pnpm-workspace.yaml, so `npm ci`
# silently skips every per-package dependency and the suite fails on imports
# that are correctly declared.
# No `version` here on purpose: package.json declares `packageManager`, and
# specifying both makes the action fail with ERR_PNPM_BAD_PM_VERSION.
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install --frozen-lockfile
# mermaid-export renders through puppeteer, which needs a real Chrome. The
# browser normally arrives via puppeteer's postinstall script, which does not
# run here, so eleven of its tests failed with "Could not find Chrome (ver. …)".
#
# Filtered to the one package that depends on puppeteer. A bare `pnpm exec` runs
# from the workspace root, where the binary does not exist, and fails with
# "Command \"puppeteer\" not found" before it reaches the package that has it.
- name: Install Chrome for puppeteer
run: pnpm --filter mermaid-export exec puppeteer browsers install chrome
- name: Typecheck
run: pnpm typecheck
- name: Test
run: pnpm test
- name: Build all packages
run: pnpm build