Skip to content

Commit 9f700d6

Browse files
chenbapjenvey
andauthored
chore: use dorny/test-reporter for reporting gh action test results (#2036)
* chore: use dorny/test-reporter for reporting gh action test results --------- Co-authored-by: Philip Jenvey <pjenvey@underboss.org>
1 parent e8a392b commit 9f700d6

7 files changed

Lines changed: 59 additions & 3 deletions

File tree

.cargo/audit.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ ignore = [
33
"RUSTSEC-2024-0365", # Bound by diesel 1.4 (4GB limit n/a to tokenserver)
44
"RUSTSEC-2024-0421", # Bound by diesel 1.4, `idna` < 0.1.5, Upgrade to >=1.0.0
55
"RUSTSEC-2024-0437", # Bound by grpcio 0.13,
6+
"RUSTSEC-2026-0002", # Bound by mysql_async, via diesel-async
67
]

.config/nextest.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ fail-fast = false
1717

1818
[profile.ci.junit]
1919
path = "junit.xml"
20-
2120
report-name = "syncstorage-unit-tests"
2221
store-success-output = false
2322
store-failure-output = true
23+
store-success-timing = true
24+
store-failure-timing = true

.github/actions/setup-rust/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828

2929
- name: Create workspace directory
3030
shell: bash
31-
run: mkdir -p ${{ inputs.workspace-path }}
31+
run: mkdir -p ${{ inputs.workspace-path }}/test-results
3232

3333
- name: Display Version Info
3434
shell: bash

.github/workflows/mysql.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ jobs:
8080
env:
8181
SYNC_SYNCSTORAGE__ENFORCE_QUOTA: 1
8282

83+
- name: Publish Test Report
84+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
85+
if: always()
86+
with:
87+
name: MySQL Unit Tests
88+
path: workflow/test-results/*.xml
89+
reporter: java-junit
90+
fail-on-error: false
91+
8392
- name: Upload test results
8493
if: always()
8594
uses: actions/upload-artifact@v6
@@ -184,6 +193,15 @@ jobs:
184193
env:
185194
SYNCSTORAGE_RS_IMAGE: app:build
186195

196+
- name: Publish E2E Test Report
197+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
198+
if: always()
199+
with:
200+
name: MySQL E2E Tests
201+
path: workflow/test-results/*.xml
202+
reporter: java-junit
203+
fail-on-error: false
204+
187205
- name: Upload e2e test results
188206
if: always()
189207
uses: actions/upload-artifact@v6

.github/workflows/postgres.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ jobs:
8686
env:
8787
SYNC_SYNCSTORAGE__DATABASE_URL: postgresql://test:test@127.0.0.1/syncstorage
8888

89+
- name: Publish Test Report
90+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
91+
if: always()
92+
with:
93+
name: Postgres Unit Tests
94+
path: workflow/test-results/*.xml
95+
reporter: java-junit
96+
fail-on-error: false
97+
8998
- name: Upload test results
9099
if: always()
91100
uses: actions/upload-artifact@v6
@@ -190,6 +199,15 @@ jobs:
190199
env:
191200
SYNCSTORAGE_RS_IMAGE: app:build
192201

202+
- name: Publish E2E Test Report
203+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
204+
if: always()
205+
with:
206+
name: Postgres E2E Tests
207+
path: workflow/test-results/*.xml
208+
reporter: java-junit
209+
fail-on-error: false
210+
193211
- name: Upload e2e test results
194212
if: always()
195213
uses: actions/upload-artifact@v6

.github/workflows/spanner.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ jobs:
9393
RUST_TEST_THREADS: 1
9494
run: make spanner_test_with_coverage
9595

96+
- name: Publish Test Report
97+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
98+
if: always()
99+
with:
100+
name: Spanner Unit Tests
101+
path: workflow/test-results/*.xml
102+
reporter: java-junit
103+
fail-on-error: false
104+
96105
- name: Upload test results
97106
if: always()
98107
uses: actions/upload-artifact@v6
@@ -197,6 +206,15 @@ jobs:
197206
env:
198207
SYNCSTORAGE_RS_IMAGE: app:build
199208

209+
- name: Publish E2E Test Report
210+
uses: dorny/test-reporter@a810f9bf83f2344124a920a7a0a85a6716e791f0
211+
if: always()
212+
with:
213+
name: Spanner E2E Tests
214+
path: workflow/test-results/*.xml
215+
reporter: java-junit
216+
fail-on-error: false
217+
200218
- name: Upload e2e test results
201219
if: always()
202220
uses: actions/upload-artifact@v6

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUST_LOG ?= debug
2929
WORKFLOW := build-deploy
3030
EPOCH_TIME := $(shell date +"%s")
3131
TEST_RESULTS_DIR ?= workflow/test-results
32-
TEST_PROFILE := $(if $(CIRCLECI),ci,default)
32+
TEST_PROFILE := $(if $(or $(CIRCLECI),$(GITHUB_ACTIONS)),ci,default)
3333
TEST_FILE_PREFIX := $(if $(CIRCLECI),$(CIRCLE_BUILD_NUM)__$(EPOCH_TIME)__$(CIRCLE_PROJECT_REPONAME)__$(WORKFLOW)__)
3434
UNIT_JUNIT_XML := $(TEST_RESULTS_DIR)/$(TEST_FILE_PREFIX)unit__results.xml
3535
MYSQL_UNIT_JUNIT_XML := $(TEST_RESULTS_DIR)/$(TEST_FILE_PREFIX)mysql_unit__results.xml

0 commit comments

Comments
 (0)