Extend CI to test artifact mode

This commit is contained in:
Michal Dorner 2021-02-16 21:34:40 +01:00
parent 89f214d9f3
commit 323e750ca2
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 42 additions and 2 deletions

View file

@ -1,4 +1,4 @@
name: 'build-test'
name: 'CI'
on:
pull_request:
paths-ignore: [ 'README.md' ]
@ -19,10 +19,31 @@ jobs:
- run: npm run format-check
- run: npm run lint
- run: npm test
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: __tests__/__results__/*.xml
- name: Create test report
if: success() || failure()
uses: ./
if: success() || failure()
continue-on-error: true
with:
name: JEST Tests
path: __tests__/__results__/*.xml
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
View 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