mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Make tests skip if filters are matched
This commit is contained in:
parent
8eeec9511b
commit
eec475cc8e
18
.github/test-filters.yml
vendored
Normal file
18
.github/test-filters.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
all:
|
||||
- "src/**"
|
||||
- "test/**"
|
||||
- "public/**"
|
||||
# Workflows that can impact tests
|
||||
- ".github/workflows/test*.yml"
|
||||
# top-level files
|
||||
- "package*.json"
|
||||
- ".nvrmc" # Updates to node version can break tests
|
||||
- "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
|
||||
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
|
||||
- "global.d.ts"
|
||||
- ".env.*"
|
||||
# Blanket negations for files that cannot impact tests
|
||||
- "!**/*.py" # No .py files
|
||||
- "!**/*.sh" # No .sh files
|
||||
- "!**/*.md" # No .md files
|
||||
- "!**/.git*" # .gitkeep and family
|
53
.github/workflows/tests.yml
vendored
53
.github/workflows/tests.yml
vendored
@ -7,56 +7,29 @@ on:
|
||||
branches:
|
||||
- main # Trigger on push events to the main branch
|
||||
- beta # Trigger on push events to the beta branch
|
||||
# go upvote https://github.com/actions/runner/issues/1182 and yell at microsoft until they fix this or ditch yml for workflows
|
||||
paths:
|
||||
# src and test files
|
||||
- "src/**"
|
||||
- "test/**"
|
||||
- "public/**"
|
||||
# Workflows that can impact tests
|
||||
- ".github/workflows/test*.yml"
|
||||
# top-level files
|
||||
- "package*.json"
|
||||
- ".nvrmc" # Updates to node version can break tests
|
||||
- "vite.*.ts" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
|
||||
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
|
||||
- "global.d.ts"
|
||||
- ".env.*"
|
||||
# Blanket negations for files that cannot impact tests
|
||||
- "!**/*.py" # No .py files
|
||||
- "!**/*.sh" # No .sh files
|
||||
- "!**/*.md" # No .md files
|
||||
- "!**/.git*" # .gitkeep and family
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main # Trigger on pull request events targeting the main branch
|
||||
- beta # Trigger on pull request events targeting the beta branch
|
||||
paths: # go upvote https://github.com/actions/runner/issues/1182 and yell at microsoft because until then we have to duplicate this
|
||||
# src and test files
|
||||
- "src/**"
|
||||
- "test/**"
|
||||
- "public/**"
|
||||
# Workflows that can impact tests
|
||||
- ".github/workflows/test*.yml"
|
||||
# top-level files
|
||||
- "package*.json"
|
||||
- ".nvrmc" # Updates to node version can break tests
|
||||
- "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
|
||||
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
|
||||
- "global.d.ts"
|
||||
- ".env.*"
|
||||
# Blanket negations for files that cannot impact tests
|
||||
- "!**/*.py" # No .py files
|
||||
- "!**/*.sh" # No .sh files
|
||||
- "!**/*.md" # No .md files
|
||||
- "!**/.git*" # .gitkeep and family
|
||||
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:
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
|
||||
with:
|
||||
filters: ./.github/test-filters.yml
|
||||
|
||||
run-tests:
|
||||
name: Run Tests
|
||||
needs: check-path-change-filter
|
||||
if: ${{ needs.changes.outputs.all == 'true'}}
|
||||
strategy:
|
||||
matrix:
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
Loading…
Reference in New Issue
Block a user