Skip to content

Commit

Permalink
Extend CI to test artifact mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Feb 16, 2021
1 parent 89f214d commit 323e750
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'build-test'
name: 'CI'
on:
pull_request:
paths-ignore: [ 'README.md' ]
Expand All @@ -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 changes: 19 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 323e750

Please sign in to comment.