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' || '' }}
|
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
@ -39,12 +39,8 @@ jobs:
|
||||
needs: [pre-test]
|
||||
strategy:
|
||||
matrix:
|
||||
project:
|
||||
# - misc
|
||||
- "src/test/abilities/**/*.{test,spec}.ts"
|
||||
# - items
|
||||
# - moves
|
||||
# - battle
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
uses: ./.github/workflows/run-test-template.yml
|
||||
with:
|
||||
project: ${{ matrix.project }}
|
||||
shard: ${{ matrix.shard }}
|
||||
totalShards: 10
|
Loading…
Reference in New Issue
Block a user