pokerogue/.github/workflows/tests.yml
Sirz Benjie 9dedf7548b
[GitHub] Make tests skip if no filters are matched (#5744)
* 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>
2025-05-21 19:05:09 -05:00

43 lines
1.1 KiB
YAML

name: Tests
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main # Trigger on push events to the main branch
- beta # Trigger on push events to the beta branch
pull_request:
branches:
- main # Trigger on pull request events targeting the main branch
- beta # Trigger on pull request events targeting the beta branch
merge_group:
types: [checks_requested]
jobs:
check-path-change-filter:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
all: ${{ steps.filter.outputs.all }}
steps:
- name: checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
with:
filters: .github/test-filters.yml
run-tests:
name: Run Tests
needs: check-path-change-filter
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
uses: ./.github/workflows/test-shard-template.yml
with:
project: main
shard: ${{ matrix.shard }}
totalShards: 10
skip: ${{ needs.check-path-change-filter.outputs.all == 'false'}}