diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 0000000..1e0f82d --- /dev/null +++ b/.github/workflows/example.yml @@ -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 }} diff --git a/example/index.spec.js b/example/index.spec.js new file mode 100644 index 0000000..c053c1b --- /dev/null +++ b/example/index.spec.js @@ -0,0 +1,5 @@ +describe('example', () => { + it('does not fail', () => { + expect(false).toBe(true); + }); +}); diff --git a/example/junit.xml b/example/junit.xml new file mode 100644 index 0000000..628482d --- /dev/null +++ b/example/junit.xml @@ -0,0 +1,17 @@ + + + + + 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 + + +