Skip to content

Commit c3c3894

Browse files
authored
Merge pull request #158 from SmoFlaDru/split-test-reporting-workflow
Change github action so that test-reporter only runs in main branch (…
2 parents aa428c2 + 4f4c0b5 commit c3c3894

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.github/workflows/django.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Django CI
1+
name: 'Django CI'
22

33
on:
44
push:
@@ -7,10 +7,6 @@ on:
77
branches: [ "master", "develop" ]
88
workflow_dispatch:
99

10-
permissions:
11-
statuses: write
12-
checks: write
13-
1410
jobs:
1511
build:
1612
name: Build & test
@@ -37,9 +33,8 @@ jobs:
3733
run: |
3834
uv run python manage.py test
3935
- name: Report test results
40-
uses: dorny/test-reporter@v1
41-
if: always()
36+
uses: actions/upload-artifact@v4
37+
if: success() || failure()
4238
with:
43-
name: Django Tests
44-
path: tests_result.xml
45-
reporter: java-junit
39+
name: test-results
40+
path: tests_result.xml

.github/workflows/test-report.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Test Report'
2+
on:
3+
workflow_run:
4+
workflows: ['Django CI']
5+
types:
6+
- completed
7+
permissions:
8+
contents: read
9+
actions: read
10+
checks: write
11+
jobs:
12+
report:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: dorny/test-reporter@v1
16+
with:
17+
artifact: test-results
18+
name: Django Tests
19+
path: '*.xml'
20+
reporter: java-junit

0 commit comments

Comments
 (0)