Skip to content

ci: add test-suite workflow running the full testthat suite#65

Open
seonghobae wants to merge 5 commits into
developfrom
claude/test-coverage-analysis-eo2uqy
Open

ci: add test-suite workflow running the full testthat suite#65
seonghobae wants to merge 5 commits into
developfrom
claude/test-coverage-analysis-eo2uqy

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

A test-coverage audit found that CI executed almost none of the numerical test suite: R-CMD-check runs with --no-tests (plus a single Zh-rule file), and test-fast runs only 3 productization files. The greedy model-selection, integration, edge-case, and stability suites — 26 testthat files total — never gated merges, which is the top systemic risk for a statistical package.

This adds a test-suite workflow that runs the complete testthat suite on a single ubuntu job:

  • push/PR: the suite's own CI guards (.skip_expensive_ci_calls, skip_on_ci) keep the expensive AEFA estimations out, so the run stays bounded (timeout-minutes: 180 as a backstop). NOT_CRAN=true is set explicitly at the job level so skip_on_cran()-guarded tests reliably run.
  • weekly schedule + manual dispatch: sets RUN_FULL_AEFA_TESTS=1 — the opt-in env var the test helpers already define — which unlocks the expensive estimations guarded by the .skip_expensive_ci_calls helper. Note that tests calling skip_on_ci() directly still skip on Actions regardless of this variable; extending those to honor an override would be a follow-up in the test files themselves.

Existing workflows are untouched: R-CMD-check keeps its 5-OS matrix cheap, and test-fast remains the quick signal.

Verification

R isn't available in the authoring environment, so this run relies on the suite's own guards (verified by reading helper-test-data.R: the expensive-call skip triggers whenever CI is set unless RUN_FULL_AEFA_TESTS=1). actions/checkout is pinned to the same v7.0.0 SHA used by R-CMD-check.yaml (standardized per review), and the r-lib action SHAs match the org's existing v2 pins. If the first PR run shows the guarded suite is still too slow, the push/PR trigger can be narrowed to schedule+dispatch only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui

CI previously executed almost none of the numerical tests: R-CMD-check ran
with --no-tests plus a single Zh-rule file, and test-fast ran only 3
productization files — the greedy model-selection, integration, edge-case,
and stability suites (26 files total) never gated merges. The new workflow
runs the whole suite on push/PR, relying on the suite's own CI guards
(.skip_expensive_ci_calls, skip_on_ci) to bound runtime, and sets
RUN_FULL_AEFA_TESTS=1 on the weekly scheduled and manual runs to exercise
the expensive AEFA estimation paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui
Copilot AI review requested due to automatic review settings July 11, 2026 03:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to run the full testthat suite for the kaefa R package, addressing the current CI gap where most numerical/integration tests do not gate merges.

Changes:

  • Introduces a test-suite workflow that runs the complete tests/testthat suite on push and pull_request.
  • Enables expensive AEFA estimation paths only for schedule and workflow_dispatch runs via RUN_FULL_AEFA_TESTS=1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-suite.yaml Outdated
Uses the same v7.0.0 commit pin as R-CMD-check.yaml instead of the older
v6.0.2 pin, per review feedback that one checkout pin across workflows
simplifies supply-chain auditing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui
Copilot AI review requested due to automatic review settings July 11, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/test-suite.yaml
Per review feedback: most testthat files use skip_on_cran(), and the
workflow's purpose is to run them. setup-r currently sets NOT_CRAN=true
implicitly, but the gate's behavior shouldn't depend on an action
default — set it explicitly on the job.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui
Copilot AI review requested due to automatic review settings July 11, 2026 03:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

NOT_CRAN: true

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Comment thread .github/workflows/test-suite.yaml Outdated
Per review: the header comment implied scheduled/manual runs exercise all
numerical paths, but RUN_FULL_AEFA_TESTS=1 only unlocks the estimations
guarded by the .skip_expensive_ci_calls helper — tests calling
skip_on_ci() directly still skip on GitHub Actions regardless.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui
Copilot AI review requested due to automatic review settings July 11, 2026 03:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@opencode-agent

opencode-agent Bot commented Jul 11, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 6a4313b06d1e41ccaeaf707d0994f6ed18a8e13e
  • Workflow run: 29138071471
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: test-suite.yaml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: test-suite.yaml"]
  R1 --> V1["actionlint plus required checks"]
Loading

The strix and opencode-review failures on the previous head were caused
by the org-central trusted-source regression (ContextualWisdomLab/.github
strix.yml statuses permission vs. tightened smoke contract), which has
since been fixed on that repo's main. Empty commit to re-run all checks
against the repaired trusted source.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AMkMUa1c1RRsbHEfsQUhui
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.

3 participants