-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (37 loc) · 1.4 KB
/
on-pull-request.yml
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
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
# Expose some environment variables for wireit
- uses: google/wireit@setup-github-actions-caching/v1
- run: npm ci
- name: Build
# `unified-latex-cli` depends on almost all `unified-latex` packages. We build it first
# so that if it errors, the build will fail.
run: |
npm run build -w packages/unified-latex-cli
npm run build -ws --if-present
- name: Test
run: npm test
# This test tests the actual packages that will be distributed
- name: Test Packages run on ESM and CJS
run: |
npm run test:packages-install
npm run test:packages-esm
npm run test:packages-cjs