File tree Expand file tree Collapse file tree 2 files changed +53
-49
lines changed Expand file tree Collapse file tree 2 files changed +53
-49
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Vitest Tests
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+ workflow_dispatch :
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ environment : test
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : " 20"
22+
23+ - name : Clear npm cache and install dependencies
24+ run : |
25+ npm cache clean --force
26+ rm -rf node_modules package-lock.json
27+ npm install
28+
29+ - name : Run Vitest Tests
30+ working-directory : ./packages/vitest
31+ continue-on-error : true
32+ run : npx vitest --run --reporter=junit --outputFile=./results.xml
33+
34+ - name : Convert JUnit XML to Currents format
35+ working-directory : ./packages/vitest
36+ run : |
37+ npx currents convert \
38+ --input-format=junit \
39+ --input-file=results.xml \
40+ --output-dir=.currents \
41+ --framework=vitest \
42+ --framework-version=v2.1.5
43+
44+ - name : Upload results to Currents
45+ working-directory : ./packages/vitest
46+ env :
47+ CURRENTS_KEY : ${{ secrets.CURRENTS_KEY }}
48+ CURRENTS_PROJECT_ID : ${{ secrets.CURRENTS_PROJECT_ID }}
49+ CURRENTS_CI_BUILD_ID : ${{ github.run_id }}-${{ github.run_number }}
50+ run : |
51+ npx currents upload \
52+ --project-id=${{ secrets.CURRENTS_PROJECT_ID }} \
53+ --key=${{ secrets.CURRENTS_KEY }}
You can’t perform that action at this time.
0 commit comments