Skip to content

CI: skip ghpages integration tests on PR builds (#335)#338

Open
ANAMASGARD wants to merge 4 commits into
masterfrom
test-ghpages-skip-on-pr
Open

CI: skip ghpages integration tests on PR builds (#335)#338
ANAMASGARD wants to merge 4 commits into
masterfrom
test-ghpages-skip-on-pr

Conversation

@ANAMASGARD

Copy link
Copy Markdown
Contributor

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.R call the GitHub API through reset_test_repo(). Those tests need an admin token on the animint-test org. 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.

  • Current failure: integration tests run and hit GitHub API without permission
Screenshot From 2026-06-11 18-03-55

Commit plan

  • Commit 1: add ghpages_tests_should_skip() and a failing test that shows the skip gate is not implemented yet.
  • Commit 2: implement the real skip logic, wire skip_if() on integration tests, and optionally set ANIMINT2_TEST_GHPAGES in the workflow for pushes to master only.

Local note: to run ghpages integration tests locally, you may need ANIMINT2_TEST_GHPAGES=1 and a valid GITHUB_PAT exported.

Comment thread tests/testthat/test-compiler-ghpages.R Outdated
@ANAMASGARD

Copy link
Copy Markdown
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

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.41%. Comparing base (9dce861) to head (bd8df89).

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     
Flag Coverage Δ
javascript 81.23% <ø> (ø)
r 68.24% <ø> (-0.90%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ANAMASGARD

Copy link
Copy Markdown
Contributor Author

Sir @tdhock the JS_coverage failure is a pre-existing Chromote issue for which I have raised a PR #337 .
PLEASE review and give your fedback .
Screenshot From 2026-06-11 20-57-30

@ANAMASGARD ANAMASGARD requested a review from tdhock June 11, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants