Skip to content

Commit

Permalink
Add test-report script (#83)
Browse files Browse the repository at this point in the history
* Add test-report script

* Run and upload test-report on publish
  • Loading branch information
dmfalke authored Apr 19, 2023
1 parent d477c0c commit b4f5faa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/npm-publish-sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ jobs:
token: ${{ secrets.NPM_TOKEN }}
access: public
package: packages/sites/${{ matrix.dir }}/package.json
- run: ./tools/scripts/test-report
- uses: actions/upload-artifact@v3
with:
name: Test report
path: ${{ github.workspace }}/test-report
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ lib-cov
coverage
*.lcov

# Directory written to by tools/scripts/test-report
test-report/

# nyc test coverage
.nyc_output

Expand Down
13 changes: 13 additions & 0 deletions tools/scripts/test-report
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/env bash

## Current, we will only run a test repo for @veupathdb/wdk-client.
## TODO Once all packages have a `test` script, we can run `yarn nx run-many --target=test`

SCRIPT_DIR=$(dirname -- "${BASH_SOURCE[0]}")

## Change to repo root
cd $SCRIPT_DIR/../..

rm -rf test-report
mkdir test-report
yarn workspace @veupathdb/wdk-client test | tee test-report/wdk-client-report.txt

0 comments on commit b4f5faa

Please sign in to comment.