Skip to content

Commit 3f2db6a

Browse files
neobernadCopilot
andcommitted
Add CI workflow documentation
Documents the GitHub Actions test workflow setup, triggers, steps, and troubleshooting guide for evaluomeR package testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4f761a4 commit 3f2db6a

1 file changed

Lines changed: 122 additions & 0 deletions

File tree

.github/CI_WORKFLOW.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# GitHub Actions CI Workflow
2+
3+
This document describes the continuous integration (CI) workflow for the evaluomeR package.
4+
5+
## Overview
6+
7+
The `.github/workflows/test.yaml` workflow automatically runs your R package tests whenever code is pushed or a pull request is created. This ensures code quality and prevents regressions before merging to main branches.
8+
9+
## Workflow Triggers
10+
11+
The workflow runs on the following events:
12+
13+
- **Push**: Any push to `main`, `master`, or `develop` branches
14+
- **Pull Request**: Any pull request targeting `main`, `master`, or `develop` branches
15+
- **Manual**: Manually triggered via GitHub Actions UI (workflow_dispatch)
16+
17+
## Test Matrix
18+
19+
Tests run across multiple R versions to ensure compatibility:
20+
21+
- **R 4.3** - Latest stable release from that series
22+
- **Latest R** - Most current R version available
23+
24+
All testing occurs on **Ubuntu Latest** runner.
25+
26+
## Workflow Steps
27+
28+
### 1. Checkout
29+
Clones your repository code.
30+
31+
### 2. Set up R
32+
Installs the specified R version using the official r-lib setup action.
33+
34+
### 3. Install System Dependencies
35+
Installs required system libraries:
36+
- `libcurl4-openssl-dev` - For HTTP communication
37+
- `libssl-dev` - For SSL/TLS support
38+
- `libxml2-dev` - For XML parsing
39+
40+
### 4. Install R Dependencies
41+
Automatically installs all package dependencies declared in `DESCRIPTION`:
42+
- **Depends**: SummarizedExperiment, MultiAssayExperiment, dplyr, cluster, fpc, randomForest, flexmix, RSKC, sparcl
43+
- **Imports**: All packages listed in the Imports field
44+
- **Extra packages**: devtools (for package installation)
45+
46+
### 5. Install Package
47+
Builds and installs your package locally using `devtools::install_local()`.
48+
49+
### 6. Run Tests
50+
Executes all test scripts in the `tests/` directory matching the pattern `test*.R`:
51+
- testARI.R
52+
- testATSC.R
53+
- testATSC_GoldStandard.R
54+
- testATSC_parallel.R
55+
- testAll.R
56+
- testAlpha_parallel.R
57+
- testAnalysis.R
58+
- testCBI.R
59+
- testCH_index.R
60+
- testDataPreprocessing.R
61+
- testK_optimo_parallel.R
62+
- testL1_clustering.R
63+
- testMetricsRelevancy.R
64+
- testPCA.R
65+
- testQuality.R
66+
- testQuality_parallel.R
67+
- testStability.R
68+
- testStability_parallel.R
69+
70+
Each test is sourced in sequence, with detailed output showing which test is running. If any test fails, the workflow exits with status 1 and reports the error.
71+
72+
### 7. Upload Artifacts
73+
Test results and scripts are uploaded as workflow artifacts for 30 days, allowing you to review test output even after the workflow completes.
74+
75+
## Viewing Results
76+
77+
### On GitHub
78+
1. Navigate to your repository
79+
2. Click the **Actions** tab
80+
3. Click on the workflow run to see detailed output
81+
4. Expand any step to see its console output
82+
5. Download artifacts from the "Artifacts" section
83+
84+
### Badges
85+
You can add a status badge to your README:
86+
87+
```markdown
88+
[![R Package Tests](https://github.com/neobernad/evaluomeR/actions/workflows/test.yaml/badge.svg)](https://github.com/neobernad/evaluomeR/actions/workflows/test.yaml)
89+
```
90+
91+
## Troubleshooting
92+
93+
### Tests Fail in CI but Pass Locally
94+
- Ensure your local R version matches one of the CI versions (R 4.3 or latest)
95+
- Check for platform-specific issues (paths, environment variables)
96+
- Verify all dependencies are correctly listed in DESCRIPTION
97+
98+
### Missing Dependencies
99+
- Add missing packages to DESCRIPTION under either `Depends` or `Imports`
100+
- For system packages, add them to the "Install system dependencies" step
101+
- Re-run the workflow after updating DESCRIPTION
102+
103+
### Long Test Execution Times
104+
- Consider splitting large parallel tests into separate workflows if needed
105+
- Optimize test code to reduce runtime
106+
- Check if tests are downloading large data files
107+
108+
## Future Enhancements
109+
110+
Possible improvements to the CI workflow:
111+
112+
1. **Code Coverage**: Add code coverage reports using `covr` package
113+
2. **R CMD Check**: Add `R CMD check` for comprehensive package validation
114+
3. **Platform Matrix**: Extend to include macOS and Windows runners
115+
4. **Documentation Builds**: Generate and validate vignettes/documentation
116+
5. **Performance Benchmarks**: Track test execution times over time
117+
118+
## Related Files
119+
120+
- `.github/workflows/test.yaml` - The main workflow definition
121+
- `DESCRIPTION` - Package metadata and dependencies
122+
- `tests/` - Directory containing all test scripts

0 commit comments

Comments
 (0)