mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 15:02:16 +02:00
* Make tests skip if filters are matched * Tweak filter path * Make thing checkout thing * Change where workflow is skipped * Change where workflow is skipped * Update github test filters * Update test-filters.yml --------- Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
39 lines
975 B
YAML
39 lines
975 B
YAML
name: Test Template
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
project:
|
|
required: true
|
|
type: string
|
|
shard:
|
|
required: true
|
|
type: number
|
|
totalShards:
|
|
required: true
|
|
type: number
|
|
skip:
|
|
required: true
|
|
type: boolean
|
|
default: false
|
|
|
|
jobs:
|
|
test:
|
|
name: Shard ${{ inputs.shard }} of ${{ inputs.totalShards }}
|
|
runs-on: ubuntu-latest
|
|
if: ${{ !inputs.skip }}
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v4.2.2
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
- name: Install Node.js dependencies
|
|
run: npm ci
|
|
- name: Run tests
|
|
run: npx vitest --project ${{ inputs.project }} --no-isolate --shard=${{ inputs.shard }}/${{ inputs.totalShards }} ${{ !runner.debug && '--silent' || '' }}
|