Skip to content

Commit 4d09b94

Browse files
committed
Add test step in CI
1 parent 816f696 commit 4d09b94

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,38 @@ jobs:
3939
with:
4040
cmd: lint
4141

42+
- name: Run Unit Tests
43+
uses: borales/actions-yarn@v5
44+
with:
45+
cmd: test --ci --reporters=default --reporters=jest-junit --coverage
46+
4247
- name: Build
4348
uses: borales/actions-yarn@v5
4449
with:
4550
cmd: build
51+
52+
- name: Upload Test Results
53+
if: always()
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: Test Results
57+
path: junit.xml
58+
59+
publish-test-results:
60+
name: 'Publish Test Results'
61+
needs: build-and-test
62+
runs-on: ubuntu-latest
63+
permissions:
64+
checks: write
65+
pull-requests: write
66+
if: always()
67+
steps:
68+
- name: Download Artifacts
69+
uses: actions/download-artifact@v4
70+
with:
71+
path: artifacts
72+
73+
- name: Publish Test Results
74+
uses: EnricoMi/publish-unit-test-result-action@v2
75+
with:
76+
junit_files: 'artifacts/**/*.xml'

0 commit comments

Comments
 (0)