Skip to content

Commit

Permalink
test: use filters to prevent redundant runs
Browse files Browse the repository at this point in the history
Only when the code changed would tests has to be run. This prevents
the large test matrix from eating up the API quota.
  • Loading branch information
alaviss committed Jan 31, 2024
1 parent 5fe177b commit bb2ed12
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ on:
- cron: "0 0 * * 0"

jobs:
filter:
name: Check if tests should be run
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.should_skip }}

steps:
- uses: actions/checkout@v4
- uses: fkirc/[email protected]
id: filter
with:
# Only run when code used by the action changed.
paths: '["dist/**", ".github/nimskull-problem-matcher.json"]'

check:
strategy:
matrix:
Expand Down

0 comments on commit bb2ed12

Please sign in to comment.