Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/sharded-vitest.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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 }} \
--debug
Loading
Loading