1+ name : build-and-test
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ pull_request :
8+ branches :
9+ - ' **'
10+ schedule :
11+ - cron : ' 0 2 * * *'
12+
13+ jobs :
14+ build-and-test :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+ - name : Install dependencies
20+ run : npm install
21+ - name : Build
22+ run : npm run all:action
23+ - name : Publish Test Report
24+ uses : ./
25+ with :
26+ report-path : ' ./ctrf/*.json'
27+ status-check : true
28+ status-check-name : ' Jest Unit Tests'
29+ upload-artifact : true
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ if : always()
33+ - name : Publish Test Report
34+ uses : ./
35+ with :
36+ report-path : ' ./ctrf/*.json'
37+ pull-request-report : true
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ if : always()
41+ standard-reports-test :
42+ needs : build-and-test
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Checkout code
46+ uses : actions/checkout@v4
47+ - name : Basic Test Report
48+ uses : ./
49+ with :
50+ report-path : ' ./ctrf-reports/ctrf-report.json'
51+ summary-report : true
52+ annotate : false
53+
54+ if : always()
55+ detailed-reports-test :
56+ needs : build-and-test
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Checkout code
60+ uses : actions/checkout@v4
61+ - name : Detailed Test Report
62+ uses : ./
63+ with :
64+ report-path : ' ./ctrf-reports/ctrf-report.json'
65+ test-report : true
66+ test-list-report : true
67+ annotate : false
68+ env :
69+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
70+ if : always()
71+ failed-reports-test :
72+ needs : build-and-test
73+ runs-on : ubuntu-latest
74+ steps :
75+ - name : Checkout code
76+ uses : actions/checkout@v4
77+ - name : Failed Test Reports
78+ uses : ./
79+ with :
80+ report-path : ' ./ctrf-reports/ctrf-report.json'
81+ failed-report : true
82+ failed-folded-report : true
83+ annotate : false
84+ env :
85+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86+ if : always()
87+ flaky-reports-test :
88+ needs : build-and-test
89+ runs-on : ubuntu-latest
90+ steps :
91+ - name : Checkout code
92+ uses : actions/checkout@v4
93+ - name : Flaky Test Reports
94+ uses : ./
95+ with :
96+ report-path : ' ./ctrf-reports/ctrf-report.json'
97+ flaky-report : true
98+ annotate : false
99+ env :
100+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101+ if : always()
102+ ai-reports-test :
103+ needs : build-and-test
104+ runs-on : ubuntu-latest
105+ steps :
106+ - name : Checkout code
107+ uses : actions/checkout@v4
108+ - name : AI Test Reports
109+ uses : ./
110+ with :
111+ report-path : ' ./ctrf-reports/ctrf-report.json'
112+ ai-report : true
113+ annotate : false
114+ if : always()
115+ skipped-reports-test :
116+ needs : build-and-test
117+ runs-on : ubuntu-latest
118+ steps :
119+ - name : Checkout code
120+ uses : actions/checkout@v4
121+ - name : Skipped Test Reports
122+ uses : ./
123+ with :
124+ report-path : ' ./ctrf-reports/ctrf-report.json'
125+ skipped-report : true
126+ annotate : false
127+ if : always()
128+ suite-reports-test :
129+ needs : build-and-test
130+ runs-on : ubuntu-latest
131+ steps :
132+ - name : Checkout code
133+ uses : actions/checkout@v4
134+ - name : Suite Test Reports
135+ uses : ./
136+ with :
137+ report-path : ' ./ctrf-reports/ctrf-report.json'
138+ suite-list-report : true
139+ suite-folded-report : true
140+ annotate : false
141+ if : always()
142+ commit-reports-test :
143+ needs : build-and-test
144+ runs-on : ubuntu-latest
145+ steps :
146+ - name : Checkout code
147+ uses : actions/checkout@v4
148+ - name : Commit Test Reports
149+ uses : ./
150+ with :
151+ report-path : ' ./ctrf-reports/ctrf-report.json'
152+ commit-report : true
153+ annotate : false
154+ if : always()
155+ custom-reports-test :
156+ needs : build-and-test
157+ runs-on : ubuntu-latest
158+ steps :
159+ - name : Checkout code
160+ uses : actions/checkout@v4
161+ - name : Custom Test Reports
162+ uses : ./
163+ with :
164+ report-path : ' ./ctrf-reports/ctrf-report.json'
165+ custom-report : true
166+ template-path : ' ./templates/custom-report.hbs'
167+ annotate : false
168+ if : always()
169+ community-reports-test :
170+ needs : build-and-test
171+ runs-on : ubuntu-latest
172+ steps :
173+ - name : Checkout code
174+ uses : actions/checkout@v4
175+ - name : Community Test Reports
176+ uses : ./
177+ with :
178+ report-path : ' ./ctrf-reports/ctrf-report.json'
179+ community-report : true
180+ community-report-name : ' summary-short'
181+ annotate : false
182+ if : always()
183+ previous-reports-test :
184+ needs : build-and-test
185+ runs-on : ubuntu-latest
186+ steps :
187+ - name : Checkout code
188+ uses : actions/checkout@v4
189+ - name : Install dependencies
190+ run : npm install
191+ - name : Modify reports
192+ run : npm run modify-reports
193+ - name : Reports Requiring Previous
194+ uses : ./
195+ with :
196+ report-path : ' ./ctrf-reports/ctrf-report.json'
197+ previous-results-report : true
198+ flaky-rate-report : true
199+ fail-rate-report : true
200+ annotate : false
201+ env :
202+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
203+ if : always()
204+ npx-cli-test :
205+ runs-on : ubuntu-latest
206+ needs : build-and-test
207+ steps :
208+ - name : Checkout code
209+ uses : actions/checkout@v4
210+ - name : Install dependencies
211+ run : npm install
212+ - name : Build
213+ run : npm run build:npm
214+ - name : Modify reports
215+ run : npm run modify-reports
216+ - name : Default tables
217+ run : node dist/core/cli.js ctrf-reports/ctrf-report.json --title "Default tables" --annotate false
218+
0 commit comments