This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.39 KB
/
vitest.yml
File metadata and controls
52 lines (44 loc) · 1.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
name: Vitest Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
environment: test
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Clear npm cache and install dependencies
run: |
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
- name: Run Vitest Tests
working-directory: ./packages/vitest
continue-on-error: true
run: npx vitest --run --reporter=junit --outputFile=./results.xml
- name: Convert JUnit XML to Currents format
working-directory: ./packages/vitest
run: |
npx currents convert \
--input-format=junit \
--input-file=results.xml \
--framework=vitest \
--framework-version=v2.1.5
- name: Upload results to Currents
working-directory: ./packages/vitest
env:
CURRENTS_KEY: ${{ secrets.CURRENTS_KEY }}
CURRENTS_PROJECT_ID: ${{ secrets.CURRENTS_PROJECT_ID }}
CURRENTS_CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_number }}
run: |
npx currents upload \
--project-id=${{ secrets.CURRENTS_PROJECT_ID }} \
--key=${{ secrets.CURRENTS_KEY }}