This document describes the Continuous Integration and Continuous Deployment (CI/CD) setup for the FilTar repository. It is intended for contributors and maintainers who want to understand or modify the automated workflows that ensure code quality and reproducibility.
FilTar uses GitHub Actions for CI/CD. The main workflow is defined in .github/workflows/ci.yml and is triggered on pushes and pull requests to the master and use_github_actions branches.
-
Python & Snakemake Environment:
- Managed with Conda using an
environment.ymlfile. - The environment is cached to speed up builds.
- Environment is created or updated automatically in the workflow.
- Managed with Conda using an
-
R Environment:
- R is set up using the official
r-lib/actions/setup-rGitHub Action. - R package dependencies are listed in
r-requirements.txtand installed via Rscript commands in the workflow. - R package library is cached using GitHub Actions cache to avoid repeated downloads and installations.
- R is set up using the official
-
System Dependencies:
- Required system packages (e.g., gzip, gtar) are installed at the start of the workflow.
-
Testing:
- The workflow runs Snakemake pipelines and R tests to ensure code correctness.
- Checkout repository
- Set up R and cache R packages
- Set up Miniconda and cache Conda environment
- Install system dependencies
- Create or update Conda environment
- Install R dependencies
- Run Snakemake pipelines and R tests
- Conda cache:
- Caches Conda packages and environments based on the hash of
environment.yml. - If the environment file changes, the cache is invalidated and rebuilt.
- Caches Conda packages and environments based on the hash of
- R package cache:
- Caches the R library directory based on the hash of
r-requirements.txt. - If R requirements change, the cache is invalidated and rebuilt.
- Caches the R library directory based on the hash of
- To add or update Python/Snakemake dependencies, edit
environment.yml. - To add or update R dependencies, edit
r-requirements.txtand the relevant install commands in.github/workflows/ci.yml. - To add system dependencies, update the relevant step in
.github/workflows/ci.yml. - For workflow logic changes, edit
.github/workflows/ci.ymldirectly.
For any questions or suggestions, please open an issue or pull request.