CI: skip ghpages integration tests on PR builds (#335)#338
Open
ANAMASGARD wants to merge 4 commits into
Open
Conversation
tdhock
reviewed
Jun 11, 2026
Contributor
Author
|
Commit 2 implements skip logic in helper-ghpages.R, wires skip_ghpages_integration() on integration tests, and sets ANIMINT2_TEST_GHPAGES on push-to-master only. Fork/PR CI should skip ghpages tests now. Moved skip logic to tests/testthat/helper-ghpages.R per testthat skipping guidance. Happy to inline in test-compiler-ghpages.R if you prefer. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #338 +/- ##
==========================================
- Coverage 73.02% 72.41% -0.62%
==========================================
Files 164 164
Lines 8837 8837
==========================================
- Hits 6453 6399 -54
- Misses 2384 2438 +54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR fixes the ghpages CI failure described in #335.
On pull request builds, especially from forks, the ghpages integration tests in
tests/testthat/test-compiler-ghpages.Rcall the GitHub API throughreset_test_repo(). Those tests need an admin token on theanimint-testorg. When that token is not available, CI fails with permission errors - even when the PR did not touch GitHub Pages.The goal is to skip those integration tests when the required CI setup is missing, instead of failing the whole build with a misleading red X.
Commit plan
ghpages_tests_should_skip()and a failing test that shows the skip gate is not implemented yet.skip_if()on integration tests, and optionally setANIMINT2_TEST_GHPAGESin the workflow for pushes tomasteronly.Local note: to run ghpages integration tests locally, you may need
ANIMINT2_TEST_GHPAGES=1and a validGITHUB_PATexported.