Skip to content

Commit

Permalink
fix: Always run tests on main to create reusable caches
Browse files Browse the repository at this point in the history
  • Loading branch information
cstepanian authored and alilleybrinker committed Aug 14, 2024
1 parent 55a5fba commit 51bcf77
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/hipcheck.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
name: Hipcheck

# Run on PRs before merging. We disallow pushing directly to main
# without going through a PR, so we don't run on `push` events for main.
# Run on both PRs and pushes to the main branch.
# It may seem redundant to run tests on main, since we disallow pushing directly
# to main and all PRs get tested before merging.
#
# But due to how GitHub Actions isolates caches, we need to run the tests on
# main so that caches are available to new PRs. The caches created when testing
# PR code cannot be re-used outside of testing that PR.
#
# See the GitHub Actions documentation here:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
on:
push:
branches: [main]
paths:
- "config/**"
- "hipcheck/**"
- "scripts/**"
- "xtask/**"
pull_request:
branches: [main]
paths:
Expand Down

0 comments on commit 51bcf77

Please sign in to comment.