mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
Add path filters to avoid unnecessarily re-running tests
This commit is contained in:
parent
e31bf91223
commit
6e3c95ccf8
52
.github/workflows/tests.yml
vendored
52
.github/workflows/tests.yml
vendored
@ -5,18 +5,62 @@ on:
|
||||
# but only for the main branch
|
||||
push:
|
||||
branches:
|
||||
- main # Trigger on push events to the main branch
|
||||
- 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/**" # PLEASE REVIEW -- Does it make sense to include this? Can modifying these break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
# 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" # I think this can impact tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- ".env.*" # PLEASE REVIEW -- can these impact test behavior?
|
||||
# Blanket negations for files that cannot impact tests
|
||||
- "!**/*.py" # No .py files
|
||||
- "!**/*.sh" # No .sh files
|
||||
- "!**/*.md" # No .md files
|
||||
- "!**/*.png" # TODO: Can the deletion of these files break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- "!**/*.jpg" # TODO: Can the deletion of these files break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- "!**/.git*" # .gitkeep and family
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main # Trigger on pull request events targeting the main branch
|
||||
- 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/**" # PLEASE REVIEW -- Does it make sense to include this? Can modifying these break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
# 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" # I think this can impact tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- ".env.*" # PLEASE REVIEW -- can these impact test behavior?
|
||||
# Blanket negations for files that cannot impact tests
|
||||
- "!**/*.py" # No .py files
|
||||
- "!**/*.sh" # No .sh files
|
||||
- "!**/*.md" # No .md files
|
||||
- "!**/*.png" # TODO: Can the deletion of these files break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- "!**/*.jpg" # TODO: Can the deletion of these files break tests? (REMOVE COMMENT AFTER REVIEW)
|
||||
- "!**/.git*" # .gitkeep and family
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
name: Run Tests
|
||||
name: Run Tests
|
||||
strategy:
|
||||
matrix:
|
||||
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
@ -24,4 +68,4 @@ jobs:
|
||||
with:
|
||||
project: main
|
||||
shard: ${{ matrix.shard }}
|
||||
totalShards: 10
|
||||
totalShards: 10
|
||||
|
Loading…
Reference in New Issue
Block a user