Skip to content

Commit a056f06

Browse files
authored
Update test action in gate.yml (#567)
* perm * upd * rem perms * test * rename * name step * summary ---------
1 parent 38d4b03 commit a056f06

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

.github/workflows/gate.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,26 @@ jobs:
3131

3232
- name: Test (4.8)
3333
run: dotnet test --no-restore --verbosity normal -f net48 --logger "trx;LogFileName=results4.trx"
34-
- name: Generate unit test report (4.8)
35-
uses: phoenix-actions/test-reporting@v12
36-
id: unit-test-report-win48
37-
if: success() || failure()
34+
- name: Upload test results (4.8)
35+
uses: actions/upload-artifact@v4 # upload test results
36+
if: success() || failure() # run this step even if previous step failed
3837
with:
39-
name: test results (win net4.8)
40-
path: BitFaster.Caching.UnitTests/TestResults/results4.trx
41-
reporter: dotnet-trx
42-
only-summary: 'true'
38+
name: test-results-win48
39+
path: BitFaster.Caching.UnitTests/TestResults/results4.trx
40+
# - name: Generate unit test report (4.8)
41+
# uses: phoenix-actions/test-reporting@v15
42+
# id: unit-test-report-win48
43+
# if: success() || failure()
44+
# with:
45+
# name: test results (win net4.8)
46+
# path: BitFaster.Caching.UnitTests/TestResults/results4.trx
47+
# reporter: dotnet-trx
48+
# only-summary: 'true'
4349

4450
- name: Test (3.1)
4551
run: dotnet test --no-restore --verbosity normal -f netcoreapp3.1 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results3.trx"
4652
- name: Generate unit test report (3.1)
47-
uses: phoenix-actions/test-reporting@v12
53+
uses: phoenix-actions/test-reporting@v15
4854
id: unit-test-report-win3
4955
if: success() || failure()
5056
with:
@@ -63,7 +69,7 @@ jobs:
6369
- name: Test (6.0)
6470
run: dotnet test --no-restore --verbosity normal -f net6.0 /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results6.trx"
6571
- name: Generate unit test report (6.0)
66-
uses: phoenix-actions/test-reporting@v12
72+
uses: phoenix-actions/test-reporting@v15
6773
id: unit-test-report-win6
6874
if: success() || failure()
6975
with:
@@ -114,7 +120,7 @@ jobs:
114120
flag-name: mac
115121
parallel: true
116122
- name: Generate unit test report
117-
uses: phoenix-actions/test-reporting@v12
123+
uses: phoenix-actions/test-reporting@v15
118124
id: unit-test-report-mac
119125
if: success() || failure()
120126
with:
@@ -152,7 +158,7 @@ jobs:
152158
flag-name: linux
153159
parallel: true
154160
- name: Generate unit test report
155-
uses: phoenix-actions/test-reporting@v12
161+
uses: phoenix-actions/test-reporting@v15
156162
id: unit-test-report-linux
157163
if: success() || failure()
158164
with:

.github/workflows/testreport.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Test Report'
2+
on:
3+
workflow_run:
4+
workflows: ['Build'] # runs after Build workflow
5+
types:
6+
- completed
7+
jobs:
8+
report:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: phoenix-actions/test-reporting@v15
12+
id: unit-test-report-win48 # Set ID reference for step
13+
with:
14+
artifact: test-results-win48 # artifact name
15+
name: Test results (win net4.8) # Name of the check run which will be created
16+
path: '*.trx' # Path to test results (inside artifact .zip)
17+
reporter: dotnet-trx # Format of test results
18+
only-summary: 'true'

0 commit comments

Comments
 (0)