Suppose I have a monorepo (npm workspace):
packages/ ├──apple ├──banana └──carrot
Currently each monorepo package has their own workflow file:
.github/workflows ├──apple.yml ├──banana.yml └──carrot.yml
Suppose running the
banana tests is very slow.
Currently I’ve set it up so it only runs the
apple tests when you change something in
on: pull_request: - 'packages/apple/*' - '.github/workflows/apple.yml'
And likewise for
Problem is, I want to run all the tests, but only if the changed package’s tests pass first. I want to ensure the package’s own tests work before running slow integration tests.
i.e. If I only update
apple I want to first run the
apple tests, and only once they pass will the (slow) tests for
Any recommendations on a good way to set this up?
Seems like I need dependent workflows or something?