-
Notifications
You must be signed in to change notification settings - Fork 22
80 lines (65 loc) · 1.96 KB
/
Copy pathci.yaml
File metadata and controls
80 lines (65 loc) · 1.96 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: CI
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
api-ts:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
# Skip lts/-2 while it refers to Node.js 16, since this version
# ships with a segfault when collecting code coverage with
# Node.js's built-in test runner.
# - lts/-2
# Skip lts/-1 while it resolves to Node.js 22, whose bundled npm 10
# rejects optional peer entries omitted by npm 11-generated lockfiles.
# Re-enable once lts/-1 bundles npm 11 or newer.
# - lts/-1
- lts/*
name: Node.js ${{ matrix.node-version }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Configure Node.js
uses: actions/setup-node@v7
with:
cache: npm
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci
- name: Compile TypeScript
run: npm run build
- name: Test
run: npm test
# Only run CI for GitHub Pages on Node.js 16 because docusaurus doesn't support
# earlier Node.js versions.
website:
runs-on: ubuntu-latest
name: GitHub Pages
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Configure Node.js
uses: actions/setup-node@v7
with:
cache: npm
node-version: lts/*
- name: Cache node_modules
uses: actions/cache@v6
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
working-directory: website
- name: Build Docusaurus static site files
run: npm run build
working-directory: website