Skip to content

Commit

Permalink
setting up junit xml reporting (#131)
Browse files Browse the repository at this point in the history
* Add diane to codeowners
  • Loading branch information
phoebe-lew authored Jan 11, 2024
1 parent 650aea7 commit e8ee946
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 3 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/integrity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,36 @@ jobs:
run: pnpm lint

- name: Run tests for all packages
run: pnpm test:node
run: pnpm test:node --reporter mocha-junit-reporter --reporter-options mochaFile=./results.xml

- name: Upload test results to update SDK reports
uses: actions/upload-artifact@v3
with:
name: junit-results
path: packages/*/results.xml

- name: Generate an access token to trigger downstream repo
uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1.6.2
id: generate_token
if: github.ref == 'refs/heads/main'
with:
app-id: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }}
private-key: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }}
owner: TBD54566975
repositories: sdk-development

- name: Trigger sdk-development report build
if: github.ref == 'refs/heads/main'
run: |
curl -L \
-H "Authorization: Bearer ${APP_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/json" \
--fail \
--data '{"ref": "main"}' \
https://api.github.com/repos/TBD54566975/sdk-development/actions/workflows/build-report.yaml/dispatches
env:
APP_TOKEN: ${{ steps.generate_token.outputs.token }}

# test-with-browsers:
# # Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,7 @@ dist
generated
packages/**/tests/compiled/
packages/**/src/try.ts
.DS_STORE
.DS_STORE

# Test report
results.xml
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# The format is described: https://github.blog/2017-07-06-introducing-code-owners/

# These owners will be the default owners for everything in the repo.
* @michaelneale @mistermoe @jiyoontbd @phoebe-lew @KendallWeihe
* @michaelneale @mistermoe @jiyoontbd @phoebe-lew @KendallWeihe @diehuxx


# -----------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@typescript-eslint/parser": "6.7.0",
"eslint": "8.49.0",
"mocha": "10.2.0",
"mocha-junit-reporter": "2.2.1",
"npkill": "0.11.3",
"semver": "7.5.4"
},
Expand Down
42 changes: 42 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8ee946

Please sign in to comment.