-
Notifications
You must be signed in to change notification settings - Fork 2
122 lines (100 loc) · 3.28 KB
/
main.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
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
name: CI
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [main, 'main-ee', release*, 'temporary/**']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
checker:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/catch-install-pnpm
- name: Code lint checker
run: pnpm checker
test-ee:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
shard: [1, 2, 3, 4]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/catch-install-pnpm
- name: Coverage test report ee
run: sh ./scripts/jest/run-ci-ee.sh ${{ matrix.shard }} ${{ strategy.job-total }}
- uses: actions/upload-artifact@v4
with:
name: coverage-artifacts-${{ matrix.shard }}
path: coverage/
test-ce:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/catch-install-pnpm
- name: Coverage test report ce
run: sh ./scripts/jest/run-ci-ce.sh
- uses: actions/upload-artifact@v4
with:
name: ce-coverage-artifacts
path: ce_coverage/
report:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: [test-ee, test-ce]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get CE Coverage
uses: actions/download-artifact@v4
with:
name: ce-coverage-artifacts
path: ce_coverage
- name: Get EE Coverage 1
uses: actions/download-artifact@v4
with:
name: coverage-artifacts-1
path: coverage
- name: Get EE Coverage 2
uses: actions/download-artifact@v4
with:
name: coverage-artifacts-2
path: coverage
- name: Get EE Coverage 3
uses: actions/download-artifact@v4
with:
name: coverage-artifacts-3
path: coverage
- name: Get EE Coverage 4
uses: actions/download-artifact@v4
with:
name: coverage-artifacts-4
path: coverage
- name: Install dependencies
uses: ./.github/actions/catch-install-pnpm
- name: Merge coverage reports
run: node ./scripts/jest/merge-report-json.js
- name: Coverage test report
uses: ArtiomTr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-coverage-file: coverage-merged.json
coverage-file: coverage-merged.json
- name: Delete artifact
uses: geekyeggo/delete-artifact@v2
with:
name: |
ce-coverage-artifacts
coverage-artifacts-1
coverage-artifacts-2
coverage-artifacts-3
coverage-artifacts-4