refactor: use snakehelpers #124
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] | |
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/action@v3.0.1 | |
with: | |
extra_args: --all-files | |
Testing: | |
runs-on: ubuntu-latest | |
needs: | |
- Pre-Commit | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: .snakemake/conda | |
key: snakemake-conda | |
- name: Download environments | |
uses: snakemake/snakemake-github-action@v1.24.0 | |
with: | |
directory: . | |
snakefile: workflow/Snakefile | |
args: > | |
--use-conda | |
--conda-create-envs-only | |
--conda-frontend mamba | |
--cores 1 | |
- name: Test workflow | |
uses: snakemake/snakemake-github-action@v1.24.0 | |
with: | |
directory: . | |
snakefile: workflow/Snakefile | |
args: > | |
--use-conda | |
--show-failed-logs | |
--cores 3 | |
--conda-cleanup-pkgs cache | |
--profile profile/default | |
--all-temp | |
- name: Cache - unlock permissions | |
run: chmod -R 777 .snakemake/conda | |
- name: Conda - make space | |
run: mamba clean --all --yes |