mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-24 18:49:16 +01:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Test Template
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
shard:
|
|
required: true
|
|
type: number
|
|
totalShards:
|
|
required: true
|
|
type: number
|
|
|
|
jobs:
|
|
test:
|
|
# We can't use dynamically named jobs until https://github.com/orgs/community/discussions/13261 is implemented
|
|
name: Shard
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- uses: ./.github/actions/setup-deps
|
|
|
|
- name: Run tests
|
|
run: >
|
|
pnpm test:silent
|
|
--shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
|
--reporter=blob
|
|
--outputFile=test-results/blob-${{ inputs.shard }}.json || true
|
|
|
|
# NB: This CANNOT be made into a job output due to not being extractable from the matrix:
|
|
# https://github.com/orgs/community/discussions/17245
|
|
- name: Upload test result blobs
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: shard-${{ inputs.shard }}-blob
|
|
path: test-results/blob-${{ inputs.shard }}.json
|
|
retention-days: 1 # don't need to keep for very long since they get merged afterwards
|
|
overwrite: true
|
|
if-no-files-found: error
|
|
if: ${{ !cancelled() }}
|