diff --git a/.github/workflows/run-pipeline.yml b/.github/workflows/run-pipeline.yml new file mode 100644 index 00000000..523d58fb --- /dev/null +++ b/.github/workflows/run-pipeline.yml @@ -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/setup-micromamba@v1.8.1 + 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} diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 00000000..d1874e3d --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -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/setup-micromamba@v1.8.1 +# 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} +