-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add a workflow which submits a mock test result
- Loading branch information
1 parent
c85ab3e
commit ed5e7a2
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
on: push | ||
name: Example | ||
jobs: | ||
example: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: | | ||
mkdir -p ./reports/junit/ | ||
cp ./example/junit.xml ./reports/junit/ | ||
# I can't find a way to make the branch name below dynamic, so we'l | ||
# need to remember to adjust it when working on features. | ||
- uses: check-run-reporter/action@master | ||
env: | ||
CHECK_RUN_REPORTER_LABEL: 'Unit Tests' | ||
CHECK_RUN_REPORTER_REPORT: 'reports/junit/**/*.xml' | ||
CHECK_RUN_REPORTER_TOKEN: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('example', () => { | ||
it('does not fail', () => { | ||
expect(false).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites name="Unit Tests" tests="1" failures="1" time="1.3"> | ||
<testsuite name="example" errors="0" failures="1" skipped="0" timestamp="2020-02-17T01:23:12" time="0.641" tests="1"> | ||
<testcase classname="example" name="does not fail" time="0.003"> | ||
<failure>Error: expect(received).toBe(expected) // Object.is equality | ||
|
||
Expected: true | ||
Received: false | ||
at Object.<anonymous> (/github/workspace/example/index.spec.js:3:19) | ||
at Object.asyncJestTest (/github/workspace/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37) | ||
at /github/workspace/node_modules/jest-jasmine2/build/queueRunner.js:43:12 | ||
at new Promise (<anonymous>) | ||
at mapper (/github/workspace/node_modules/jest-jasmine2/build/queueRunner.js:26:19) | ||
at /github/workspace/node_modules/jest-jasmine2/build/queueRunner.js:73:41</failure> | ||
</testcase> | ||
</testsuite> | ||
</testsuites> |