forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish improvements to the CI configuration for documentation changes (…
…haskell#9460) * Add bootstrap postjob to CI config Add a new job to the bootstrap.yml GitHub action config. This job succeeds if, and only if, all the other bootstrap jobs succeed. * Do not run bootstrap CI jobs for documentation changes The approach was already introduced in haskell#9355 for the validate jobs. This commit introduces the same change also for the bootstrap jobs. * Also ignore CONTRIBUTING.md and README.md in CI We do not run the entire CI suite for documentation changes. Previously, only changes which were restricted to the 'docs/' subdirectory were considered to be documentation changes. With this commit we also recognize changes to README.md and CONTRIBUTING.md as documentation changes. * Document improved CI for documentation in CONTRIBUTING.md The CONTRIBUTING.md file now mentions that documentation changes do not waste expensive CI resources. * Recognize all README.md in subdirs as documentation Expensive CI jobs should not run on changes which affect only README.md files.
- Loading branch information
1 parent
e16c380
commit c37a9b7
Showing
5 changed files
with
90 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Bootstrap Skip | ||
|
||
# This Workflow is special and contains a workaround for a known limitation of GitHub CI. | ||
# | ||
# The problem: We don't want to run the "bootstrap" jobs on PRs which contain only changes | ||
# to the docs, since these jobs take a long time to complete without providing any benefit. | ||
# We therefore use path-filtering in the workflow triggers for the bootstrap jobs, namely | ||
# "paths-ignore: doc/**". But the "Bootstrap post job" is a required job, therefore a PR cannot | ||
# be merged unless the "Bootstrap post job" completes succesfully, which it doesn't do if we | ||
# filter it out. | ||
# | ||
# The solution: We use a second job with the same name which always returns the exit code 0. | ||
# The logic implemented for "required" workflows accepts if 1) at least one job with that name | ||
# runs through, AND 2) If multiple jobs of that name exist, then all jobs of that name have to | ||
# finish successfully. | ||
on: | ||
push: | ||
paths: | ||
- 'doc/**' | ||
- '**/README.md' | ||
- 'CONTRIBUTING.md' | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- 'doc/**' | ||
- '**/README.md' | ||
- 'CONTRIBUTING.md' | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
bootstrap-post-job: | ||
if: always() | ||
name: Bootstrap post job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters