-
Notifications
You must be signed in to change notification settings - Fork 7
131 lines (120 loc) · 4.1 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI Host
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
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-icons
run: pnpm build
working-directory: packages/boxel-icons
- name: Serve boxel-icons
run: pnpm serve &> /tmp/icon-server.log &
working-directory: packages/boxel-icons
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
# this is to hopefully address the CI network flakiness that we
# occasionally see in host tests.
# https://github.com/actions/runner-images/issues/1187#issuecomment-686735760
- name: Disable TCP/UDP network offloading
run: sudo ethtool -K eth0 tx off rx off
- name: Start host to serve assets for fastboot
run: pnpm start &
env:
NODE_OPTIONS: --max_old_space_size=4096
working-directory: packages/host
- name: Wait for ember-cli to be ready
run: pnpm npx wait-for-localhost 4200
working-directory: packages/host
- name: Start realm servers
run: pnpm start:all &> /tmp/server.log &
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
- name: Upload realm server log
uses: actions/upload-artifact@v4
if: always()
with:
name: realm-server-log-${{ matrix.shardIndex }}
path: /tmp/server.log
retention-days: 30
- name: Upload icon server log
uses: actions/upload-artifact@v4
if: always()
with:
name: icon-server-log-${{ matrix.shardIndex }}
path: /tmp/icon-server.log
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/publish-unit-test-result-action@v2.9.0
if: always()
with:
junit_files: host.xml
check_name: Host Test Results