forked from cardstack/boxel
-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (91 loc) · 2.95 KB
/
ci-host.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CI Host
on:
push:
branches: [main]
pull_request:
permissions:
checks: write
contents: read
id-token: write
pull-requests: write
jobs:
host-test:
name: Host Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5, 6]
shardTotal: [6]
concurrency:
group: boxel-host-test${{ github.head_ref || github.run_id }}-shard${{ matrix.shardIndex }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build host dist/ for fastboot
run: pnpm build
env:
NODE_OPTIONS: --max_old_space_size=4096
working-directory: packages/host
- name: Start realm servers
run: pnpm start:all &
working-directory: packages/realm-server
- name: create realm users
run: pnpm register-realm-users
working-directory: packages/matrix
- name: host test suite (shard ${{ matrix.shardIndex }})
run: pnpm test-with-percy
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_HOST }}
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }}
HOST_TEST_PARTITION: ${{ matrix.shardIndex }}
HOST_TEST_PARTITION_COUNT: ${{ matrix.shardTotal }}
working-directory: packages/host
- name: Upload junit report to GitHub Actions Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: host-test-report-${{ matrix.shardIndex }}
path: junit/host-${{ matrix.shardIndex }}.xml
retention-days: 30
host-merge-reports-and-publish:
name: Merge Host reports and publish
if: always()
needs: host-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init
- name: Finalise Percy
run: npx percy build:finalize
working-directory: packages/host
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_HOST }}
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Download JUnit reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-host-reports
pattern: host-test-report-*
merge-multiple: true
- run: ls
- run: ls all-host-reports
- name: Merge reports
run: npx junit-report-merger host.xml "./all-host-reports/*.xml"
- name: Upload merged report
uses: actions/upload-artifact@v4
if: always()
with:
name: host-test-report-merged
path: host.xml
retention-days: 30
- name: Publish test results
uses: EnricoMi/[email protected]
if: always()
with:
junit_files: host.xml
check_name: Host Test Results