From 3082802a77743445fd05614159fc46ad92e077c3 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:04:30 +0800 Subject: [PATCH] refactor example_worklfow test run into separate script to preserve alias --- .github/workflows/run_test_example.sh | 8 ++++++++ .github/workflows/test_example.yml | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100755 .github/workflows/run_test_example.sh diff --git a/.github/workflows/run_test_example.sh b/.github/workflows/run_test_example.sh new file mode 100755 index 0000000..4f5678f --- /dev/null +++ b/.github/workflows/run_test_example.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# alias to a call launching the syri entrypoint from python +# necessary, as the hacky git install does not install the CLI entrypoints +alias syri='python <(echo "import syri.scripts.syri;syri.scripts.syri.main()")' + +# run using source to preserve alias +source ../../example/example_workflow.sh diff --git a/.github/workflows/test_example.yml b/.github/workflows/test_example.yml index 9f02a71..4ab148c 100644 --- a/.github/workflows/test_example.yml +++ b/.github/workflows/test_example.yml @@ -25,8 +25,4 @@ jobs: run: | $CONDA/bin/conda install -c conda-forge -c bioconda "minimap2" - name: Test example_run.sh - run: | - # alias to a call launching the syri entrypoint from python - # necessary, as the hacky git install does not install the CLI entrypoints - alias syri='python <(echo "import syri.scripts.syri;syri.scripts.syri.main()")' - ./example/example_workflow.sh + run: ./.github/workflows/run_test_example.sh