Skip to content

Commit

Permalink
chore: jest workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Jun 1, 2024
1 parent 56bbd34 commit bddfb34
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/jest-testing.yml
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

1 comment on commit bddfb34

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: NaN%
Unknown% (0/0) Unknown% (0/0) Unknown% (0/0)

JUnit

Tests Skipped Failures Errors Time
7 0 💤 1 ❌ 0 🔥 2.276s ⏱️

Please sign in to comment.