-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (62 loc) · 1.68 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
name: CI
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
env:
TURBO_TELEMETRY_DISABLED: 1
jobs:
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [20.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set pnpm store path
run: |
pnpm config set store-dir ~/.pnpm-store --global
- name: Install Dependencies
run: |
pnpm install
shell: bash
- name: Run Tests
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
# Run tasks in serial on Ubuntu to avoid Xvfb issues
pnpm run ci-linux
else
pnpm run ci
fi
shell: bash
- name: 🐛 Show logs
if: failure()
run: |
pnpm run ci:e2e:logs
- name: 🐛 Debug Build
uses: stateful/[email protected]
if: failure()
with:
timeout: '180000'