Skip to content

Commit

Permalink
change order of yaml names to include new R test file in mnt
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-messier committed Oct 1, 2024
1 parent ab3dfb7 commit 775c98d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/test-container-dl-calc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Create run_dl_calc_tests.R dynamically
run: |
echo 'testthat::test_file("tests/testthat/test_download.R")' > tests/testthat/run_dl_calc_tests.R
echo 'testthat::test_file("tests/testthat/test_calculate.R")' >> tests/testthat/run_dl_calc_tests.R
- name: Install Apptainer dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
Expand All @@ -34,7 +39,7 @@ jobs:
uses: actions/cache@v3
with:
path: beethoven_dl_calc.sif
key: sif-cache-${{ runner.os }}-${{ hashFiles('container/beethoven_dl_calc.def') }}
key: sif-cache-${{ runner.os }}-${{ hashFiles('beethoven_dl_calc.def') }}
restore-keys: |
sif-cache-${{ runner.os }}-
Expand All @@ -50,12 +55,14 @@ jobs:
path: beethoven_dl_calc.sif
key: sif-cache-${{ hashFiles('beethoven_dl_calc.def') }}

- name: Create run_dl_calc_tests.R dynamically
run: |
echo 'testthat::test_file("tests/testthat/test_download.R")' > tests/testthat/run_dl_calc_tests.R
echo 'testthat::test_file("tests/testthat/test_calculate.R")' >> tests/testthat/run_dl_calc_tests.R


- name: Run tests inside the container
run: |
apptainer exec beethoven_dl_calc.sif Rscript tests/testhat/run_dl_calc_tests.R
- name: Run R tests
run: |
apptainer exec \
--bind $PWD/inst:/pipeline \
--bind $PWD/input:/input \
--bind $PWD/_targets:/opt/_targets \
--bind $PWD:/mnt \
beethoven_dl_calc.sif \
Rscript /mnt/tests/testhat/run_dl_calc_tests.R

0 comments on commit 775c98d

Please sign in to comment.