-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.23 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
collect_dirs:
runs-on: ubuntu-latest
outputs:
test_matrix: ${{ steps.run_collect_dirs.outputs.test_matrix }}
steps:
- uses: actions/checkout@v4
- id: run_collect_dirs
run: echo "test_matrix=$(.scripts/build_matrix.py)" >> ${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@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install npm, yarn and pnpm
run: 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: Check test results
run: |
if [[ ${{ contains(needs.test.result, 'failure') }} == 'true' ]]; then
echo "One or more tests failed"
exit 1
else
echo "All tests passed"
fi