ci: conda strict channel priority #3
This file contains 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
# Run tests over snakefile workflow | |
--- | |
name: Tests | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: [main, devel] | |
pull_request: | |
branches: [main, devel] | |
env: | |
CACHE_NUMBER: 0 # Increment this number to invalidate the cache | |
jobs: | |
Pre-Commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Run pre-commit on all files | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files | |
Testing: | |
runs-on: ubuntu-latest | |
needs: | |
- Pre-Commit | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Set up caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.snakemake/conda | |
~/.cache/pre-commit/ | |
key: snakemake-conda-${{ env.CACHE_NUMBER }} | |
- name: Set up channel priority | |
run: conda config --set channel_priority strict | |
- name: Clean conda cache | |
run: conda clean --all --yes | |
- name: Test workflow - Preprocess | |
uses: snakemake/[email protected] | |
with: | |
directory: . | |
snakefile: workflow/Snakefile | |
args: > | |
--use-conda | |
--show-failed-logs | |
--cores 3 | |
--conda-cleanup-pkgs cache | |
--latency-wait 5 | |
all | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: results | |
path: | | |
results/**/*.log | |
# results/ | |
# reports/ | |
# !**/*.cram | |
# !**/*.fq.gz | |
# !**/*.bam | |
# !**/*.bt2 |