Skip to content

test: add basic tests for run & main.R#3

Merged
kelly-sovacool merged 17 commits into
mainfrom
tests
May 22, 2026
Merged

test: add basic tests for run & main.R#3
kelly-sovacool merged 17 commits into
mainfrom
tests

Conversation

@kelly-sovacool
Copy link
Copy Markdown
Member

@kelly-sovacool kelly-sovacool commented May 22, 2026

Changes

adds basic tests for use in CI

Issues

NA

PR Checklist

(Strikethrough any points that are not applicable.)

  • This comment contains a description of changes with justifications, with any relevant issues linked.
  • Run the capsule in Code Ocean and ensure it completes successfully with no errors.
  • [ ] Update CHANGELOG.md with a short description of any user-facing changes and reference the PR number. Follow the style described in https://style.tidyverse.org/news.html
  • The tests workflow succeeds on the latest commit.

Comment thread .github/workflows/tests.yml Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 basic CI test harness to validate that the capsule entrypoints (code/main.R and code/run) execute successfully and generate the expected expression heatmap output.

Changes:

  • Add testthat tests that run Rscript main.R and bash run ... in an isolated temp workspace and assert the heatmap PNG is produced.
  • Add CLI/test helpers to stage fixture data + patch main.R to load the in-repo MOSuite checkout during tests.
  • Add a GitHub Actions workflow that runs tests inside the capsule’s Docker base image and expose status via a README badge.

Reviewed changes

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

Show a summary per file
File Description
tests/testthat/test-main.R End-to-end tests invoking main.R and run, asserting plot output exists.
tests/testthat/helper-cli.R Helper utilities to set up a temp workspace, copy fixtures, and validate plot output.
tests/testthat.R Test runner script for CI (Rscript tests/testthat.R).
tests/test-setup.R Standalone diagnostic script for verifying paths/fixtures.
README.md Adds GitHub Actions “tests” status badge.
.github/workflows/tests.yml CI workflow to run the test runner inside the capsule Docker image.

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

Comment thread tests/testthat.R
Comment thread tests/test-setup.R Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kelly-sovacool kelly-sovacool merged commit a76df07 into main May 22, 2026
4 checks passed
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