forked from ubiquity/pay.ubq.fi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 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,60 @@ | ||
name: Run Jest testing suite | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- development | ||
pull_request: | ||
|
||
env: | ||
NODE_ENV: "test" | ||
|
||
jobs: | ||
testing: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
|
||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Start Anvil | ||
run: yarn test:anvil & | ||
|
||
- name: Wait for Anvil | ||
run: | | ||
for i in {1..30} | ||
do | ||
if curl -s http://localhost:8545; then | ||
break | ||
fi | ||
sleep 1 | ||
done || exit 1 | ||
- name: Fund test accounts | ||
run: yarn test:fund | ||
|
||
- name: Testing | ||
run: | | ||
yarn test:jest | tee ./coverage.txt && exit ${PIPESTATUS[0]} | ||
- name: Jest Coverage Comment | ||
# Ensures this step is run even on previous step failure (e.g. test failed) | ||
if: always() | ||
uses: MishaKav/jest-coverage-comment@main | ||
with: | ||
coverage-summary-path: coverage/coverage-summary.json | ||
junitxml-path: junit.xml | ||
junitxml-title: JUnit | ||
coverage-path: ./coverage.txt |
bddfb34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUnit