<#1123 FEAT: Refactor CI to only test modified fil...
# configs
g
#1123 FEAT: Refactor CI to only test modified files Pull request opened by maxulysse Description Replace the hardcoded 154-profile test matrix with a dynamic
detect-changes
job that only tests profiles affected by the PR. Inspired by nf-core/modules' approach with
detect-nf-test-changes
. Changes
.github/workflows/main.yml
• New
detect-changes
job
: Uses
git diff
with
fetch-depth: 0
between base and head to determine which files changed, then builds a JSON test matrix dynamically • Dynamic
profile_test
matrix
: Instead of a hardcoded list of 154 profiles, the matrix is built from
fromJson(needs.detect-changes.outputs.tests)
• Smart test selection: • Push to master → test all profiles • Core infrastructure (main.yml, nextflow.config, nfcore_custom.config, configtest.nf, bin/) → test all profiles •
conf/<name>.config
changes → test only that profile •
conf/sanger/farm22.config
or
conf/uppmax/rackham.config
changes → test the parent profile •
conf/pipeline/<pipeline>/<name>.config
changes → test the matching pipeline profiles with
-c pipeline/<pipeline>.config --custom_config_base ${GITHUB_WORKSPACE}
• Only docs changed → skip tests entirely • Pipeline tests: New
type: pipeline
test steps that run
nextflow run <http://configtest.nf|configtest.nf> -profile <name> -c pipeline/<pipeline>.config --custom_config_base ${GITHUB_WORKSPACE}
bin/cchecker.py
• Removed GitHub Actions matrix validation (no longer a hardcoded matrix) • Now validates internal consistency: • All profiles in
nfcore_custom.config
have config files in
conf/
• All config files in
conf/
are registered in
nfcore_custom.config
• All pipeline-specific configs are referenced in
pipeline/<pipeline>.config
Testing This PR should be tested by creating a PR that modifies a single config file and verifying only that profile's test runs. nf-core/configs