pokerogue/.github/workflows/tests.yml
Sirz Benjie 965f3d0eef
[GitHub] Optimize workflow files (#6539)
* Use sparse checkout for paths-filter to only grab the test-filters file

* Tweak docs workflow to not download public directory

* stop downloading openssh and git
2025-09-10 11:39:36 -05:00

55 lines
1.2 KiB
YAML

name: Tests
on:
push:
branches:
- main
- beta
- release
- 'hotfix*'
pull_request:
branches:
- main
- beta
- release
- 'hotfix*'
merge_group:
types: [checks_requested]
workflow_dispatch:
jobs:
check-path-change-filter:
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
all: ${{ steps.filter.outputs.all }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/test-filters.yml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: .github/test-filters.yml
run-tests:
name: Run Tests
needs: check-path-change-filter
strategy:
# don't stop upon 1 shard failing
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
uses: ./.github/workflows/test-shard-template.yml
with:
project: main
shard: ${{ matrix.shard }}
totalShards: 5
skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}}