-
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (55 loc) · 1.5 KB
/
ci.yml
File metadata and controls
71 lines (55 loc) · 1.5 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
# Disable corepack from downloading the latest version of package managers,
# which may be buggy.
COREPACK_DEFAULT_TO_LATEST: 0
jobs:
collect_dirs:
runs-on: ubuntu-latest
outputs:
test_matrix: ${{ steps.run_collect_dirs.outputs.test_matrix }}
steps:
- uses: actions/checkout@v6
- run: echo "test_matrix=$(.scripts/build_matrix.py)" > output.txt
- run: cat output.txt
- id: run_collect_dirs
run: cat output.txt >> ${GITHUB_OUTPUT}
test:
runs-on: ubuntu-latest
needs: collect_dirs
strategy:
matrix: ${{ fromJson(needs.collect_dirs.outputs.test_matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.14.0
- name: Install npm, yarn and pnpm
run: |
npm install -g corepack
corepack --version
corepack enable
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Test
run: bash -c ".scripts/test.sh ${{ matrix.package_manager }} ${{ matrix.dirs }}"
after_test:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Print tests results
run: |
echo "Test results:"
echo "${{ toJSON(needs) }}"
- name: Exit with failure if any tests failed
if: always() && needs.test.result != 'success'
run: exit 1