chore: small refactoring #9
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
name: Run Tests and Publish Report | |
on: [push, pull_request] # Runs this workflow on push and pull requests | |
jobs: | |
test-and-publish: | |
name: Test and Publish Report | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install dependencies | |
run: yarn | |
- name: Run tests | |
run: yarn test | |
- name: Upload reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-report | |
path: ./report/ | |
- name: API Test Report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: API Test Report | |
path: ./report/junit-report.xml | |
reporter: jest-junit | |
fail-on-error: true | |
token: ${{ secrets.GITHUB_TOKEN }} |