-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (41 loc) · 1.49 KB
/
CI.yml
File metadata and controls
53 lines (41 loc) · 1.49 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
# For PRs, use the ref (branch) in the concurrency group so that new pushes cancel any old runs.
# For pushes to main, ideally we wouldn't set a concurrency group, but github actions doesn't
# support conditional blocks of settings, so we use the SHA so the "group" is unique.
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Run on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version-file: .nvmrc
- name: yarn
run: yarn --frozen-lockfile
- name: verify change files
# Only run OS-agnostic checks on ubuntu (this also makes the windows build less slow)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: yarn checkchange
- name: check package versions
if: ${{ matrix.os == 'ubuntu-latest' }}
run: yarn syncpack:check
- run: yarn format:check
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: yarn build
- run: yarn lint
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: yarn test