Test pipeline on GHA #5
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
name: Test snakemake 🐍 pipeline | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-pipeline: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- "8888:3306" | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Setup pipeline 🚰 | |
uses: actions/checkout@v4 | |
- name: Setup slurm 🐌 | |
uses: koesterlab/setup-slurm-action@v1 | |
- name: Cache conda 🏦 | |
uses: actions/cache@v4 | |
env: | |
# Increase this value to reset cache if environment.yml has not changed | |
CACHE_NUMBER_CONDA: 0 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER_CONDA }}-${{hashFiles('environment.yml') }} | |
- name: Setup conda 🐍 | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: aatrnaseqpipe | |
environment-file: environment.yml | |
use-only-tar-bz2: true | |
- name: Cache test data 🏦 | |
uses: actions/cache@v4 | |
env: | |
# Increase this value to reset cache if environment.yml has not changed | |
CACHE_NUMBER_TEST_DATA: 0 | |
with: | |
path: ~/.test | |
key: | |
${{ runner.os }}-test-data-${{ env.CACHE_NUMBER_TEST_DATA }} | |
- name: Download test data | |
run: | | |
cd .test | |
bash dl_test_data.sh |