Skip to content

feat: added postman example with environment file #23

feat: added postman example with environment file

feat: added postman example with environment file #23

name: Vitest Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
environment: test
strategy:
matrix:
shard: [1, 2]
total-shards: [2]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Run Vitest Tests (Shard ${{ matrix.shard }}/${{ matrix.total-shards }})
working-directory: ./packages/vitest-sharded
continue-on-error: true
run: npx vitest --run --shard=${{ matrix.shard }}/${{ matrix.total-shards }} ./tests/** --reporter=junit --outputFile=.results-${{ matrix.shard }}.xml
# - name: Combine Vitest Sharded results
# run: node ./scripts/combineResults.js --reports-dir .results --output-file .results/merged.results.xml
# - name: Generate Instance files
# run: node ../scripts/junitXmlToInstanceJson.js --input .results/currents.results.xml --output .results/instances
# - name: Report Vitest Sharded results
# env:
# CURRENTS_KEY: ${{ secrets.CURRENTS_KEY }}
# CURRENTS_PROJECT_ID: ${{ secrets.CURRENTS_PROJECT_ID }}
# CURRENTS_CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_number }}
# run: node scripts/uploadResults.js --report-dir vitest-sharded-example