-
Notifications
You must be signed in to change notification settings - Fork 20
70 lines (65 loc) · 1.98 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on:
merge_group:
pull_request:
types: [opened, synchronize]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # for checkout
jobs:
build:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- run: pnpm install --ignore-scripts
- run: pnpm build --filter=!./apps/*
- run: pnpm lint
test:
needs: build
timeout-minutes: 15
strategy:
# A test failing on windows doesn't mean it'll fail on macos. It's useful to let all tests run to its completion to get the full picture
fail-fast: false
matrix:
# https://nodejs.org/en/about/releases/
# https://pnpm.io/installation#compatibility
# @TODO re-enable `current` once it recovers
# node: [lts/-1, lts/*, current]
node: [lts/-1, lts/*]
os: [ubuntu-latest]
# Also test the LTS on mac and windows
include:
- os: macos-latest
node: lts/*
# - os: windows-latest
# node: lts/*
runs-on: ${{ matrix.os }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
# It's only necessary to do this for windows, as mac and ubuntu are sane OS's that already use LF
- if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: ${{ matrix.node }}
- run: pnpm install --loglevel=error --ignore-scripts
- run: pnpm test