-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 952 Bytes
/
api-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}