Skip to content

chore(deps-dev): bump vitest from 2.1.1 to 2.1.9 #38

chore(deps-dev): bump vitest from 2.1.1 to 2.1.9

chore(deps-dev): bump vitest from 2.1.1 to 2.1.9 #38

Workflow file for this run

name: examples vitest workflow
on:
push:
jobs:
default-test:
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/3, 2/3, 3/3]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run test
run: pnpm dlx vitest --shard=${{ matrix.shard }}
working-directory: examples/vitest
use-tenbin-vitest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3]
shardTotal: [3]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run build
run: pnpm run build
- name: Restore tenbin-report.json
id: tenbin-report-cache
uses: actions/cache/restore@v4
with:
path: tenbin-report.json
key: tenbin-report
restore-keys: |
tenbin-report-*
- name: Copy tenbin-report.json to working directory
run: |
if [ -e ./tenbin-report.json ]; then
jq . tenbin-report.json
cp tenbin-report.json examples/vitest
fi
- name: Run test
run: pnpx vitest --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} -c vitest-with-tenbin.config.mts
working-directory: examples/vitest
- name: Upload tenbin-report.json
if: github.ref_name == 'main'
uses: actions/upload-artifact@v4
with:
name: tenbin-report-${{ matrix.shardIndex }}
path: examples/vitest/tenbin-report.json
merge-and-cache-tenbin-report:
if: github.ref_name == 'main'
runs-on: ubuntu-latest
needs: [use-tenbin-vitest]
steps:
- uses: actions/download-artifact@v4
with:
path: tenbin-report
pattern: tenbin-report-*
- name: Merge tenbin-report
run: jq -s add tenbin-report/**/tenbin-report.json > tenbin-report.json
- name: Cache tenbin-report.json
uses: actions/cache/save@v4
with:
path: tenbin-report.json
key: tenbin-report-${{ github.run_id }}