Skip to content

Commit

Permalink
Create reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
endast committed May 16, 2024
1 parent 8545e1d commit 23ee8e7
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/run-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run pipeline


on:
workflow_call:
inputs:
environment_file:
required: true
type: str
pipeline_cmd:
required: true
type: str
name:
required: true
type: str

jobs:
Run-Pipeline:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: mamba-org/[email protected]
with:
environment-name: pipeline-env
environment-file: ${{inputs.environment_file}}
cache-environment: true
cache-downloads: true
- name: ${{inputs.name}}
run: ${{inputs.pipeline_cmd}}
shell: micromamba-shell {0}
40 changes: 40 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: DeepRVAT Pipeline tests
run-name: DeepRVAT Pipeline tests 🧬🧪💻🧑‍🔬
on: [ push ]

jobs:
Smoke-RunTraining:
uses: /.github/workflow/run-pipeline.yml
with:
environment-file: ${{ github.workspace }}/deeprvat_env_no_gpu.yml
name: Smoke-RunTraining
pipeline_cmd: |
python -m snakemake -n -j 2 --directory ${{ github.workspace }}/example \
--snakefile ${{ github.workspace }}/pipelines/run_training.snakefile --show-failed-logs
# Pipeline-Tests-RunTraining:
# runs-on: ubuntu-latest
# needs: Smoke-RunTraining
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - uses: mamba-org/[email protected]
# with:
# environment-name: deeprvat-gh-action
# environment-file: ${{ github.workspace }}/deeprvat_env_no_gpu.yml
# cache-environment: true
# cache-downloads: true
# - name: Install DeepRVAT
# run: pip install -e ${{ github.workspace }}
# shell: micromamba-shell {0}
# # There are no GPUs on the gh worker, so we disable it in the config
# - name: Update config to use no gpus
# run: "sed -i 's/gpus: 1/gpus: 0/' ${{ github.workspace }}/example/config.yaml"
# shell: bash -el {0}
# - name: Run run_training pipeline
# run: |
# python -m snakemake -j 2 --directory ${{ github.workspace }}/example \
# --snakefile ${{ github.workspace }}/pipelines/run_training.snakefile --show-failed-logs -F
# shell: micromamba-shell {0}

0 comments on commit 23ee8e7

Please sign in to comment.