mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
adopt shards
workflow in vitest
This commit is contained in:
parent
f619dbf0d2
commit
1083ee56fe
26
.github/workflows/test-shard-template.yml
vendored
Normal file
26
.github/workflows/test-shard-template.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Test Template
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
shard:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
totalShards:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run tests
|
||||||
|
run: npx vitest --project main --shard={{ inputs.shard }}/{{ inputs.totalShards }} ${{ !runner.debug && '--silent' || '' }}
|
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
@ -35,16 +35,12 @@ jobs:
|
|||||||
run: npx vitest run --project pre ${{ !runner.debug && '--silent' || '' }}
|
run: npx vitest run --project pre ${{ !runner.debug && '--silent' || '' }}
|
||||||
|
|
||||||
run-tests:
|
run-tests:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
needs: [pre-test]
|
needs: [pre-test]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
project:
|
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||||
# - misc
|
|
||||||
- "src/test/abilities/**/*.{test,spec}.ts"
|
|
||||||
# - items
|
|
||||||
# - moves
|
|
||||||
# - battle
|
|
||||||
uses: ./.github/workflows/run-test-template.yml
|
uses: ./.github/workflows/run-test-template.yml
|
||||||
with:
|
with:
|
||||||
project: ${{ matrix.project }}
|
shard: ${{ matrix.shard }}
|
||||||
|
totalShards: 10
|
Loading…
Reference in New Issue
Block a user