mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Extend CI to test artifact mode
This commit is contained in:
parent
89f214d9f3
commit
323e750ca2
2 changed files with 42 additions and 2 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: 'build-test'
|
name: 'CI'
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore: [ 'README.md' ]
|
paths-ignore: [ 'README.md' ]
|
||||||
|
|
@ -19,10 +19,31 @@ jobs:
|
||||||
- run: npm run format-check
|
- run: npm run format-check
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
|
- name: Upload test results
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: test-results
|
||||||
|
path: __tests__/__results__/*.xml
|
||||||
|
|
||||||
- name: Create test report
|
- name: Create test report
|
||||||
if: success() || failure()
|
|
||||||
uses: ./
|
uses: ./
|
||||||
|
if: success() || failure()
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
name: JEST Tests
|
name: JEST Tests
|
||||||
path: __tests__/__results__/*.xml
|
path: __tests__/__results__/*.xml
|
||||||
reporter: jest-junit
|
reporter: jest-junit
|
||||||
|
|
||||||
|
artifact-test:
|
||||||
|
name: Artifact test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-test
|
||||||
|
steps:
|
||||||
|
- uses: ./
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
artifact: test-results
|
||||||
|
name: Artifact Report
|
||||||
|
path: '*.xml'
|
||||||
|
reporter: jest-junit
|
||||||
|
|
|
||||||
19
.github/workflows/test-report.yml
vendored
Normal file
19
.github/workflows/test-report.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: Test Report
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ['CI']
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
report:
|
||||||
|
name: Workflow test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: ./
|
||||||
|
with:
|
||||||
|
artifact: test-results
|
||||||
|
name: Workflow Report
|
||||||
|
path: '*.xml'
|
||||||
|
reporter: jest-junit
|
||||||
Loading…
Add table
Add a link
Reference in a new issue