test: add basic tests for run & main.R#3
Merged
Merged
Conversation
git-subtree-dir: code/MOSuite git-subtree-split: c09ee39f9b282237f13d88dcf4cdfed965209c68
…/MOSuite-plot-expr-heatmap into auto-sync-subtree
Contributor
There was a problem hiding this comment.
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
testthattests that runRscript main.Randbash run ...in an isolated temp workspace and assert the heatmap PNG is produced. - Add CLI/test helpers to stage fixture data + patch
main.Rto 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Changes
adds basic tests for use in CI
Issues
NA
PR Checklist
(
Strikethroughany points that are not applicable.)[ ] UpdateCHANGELOG.mdwith a short description of any user-facing changes and reference the PR number. Follow the style described in https://style.tidyverse.org/news.htmltestsworkflow succeeds on the latest commit.