From 15942d9672e1feeba348d927c4726ce796269ee8 Mon Sep 17 00:00:00 2001 From: Tom Roberts Date: Tue, 20 Feb 2024 13:54:34 +0000 Subject: [PATCH] Update build_and_test GHA with container creation and testing --- .github/workflows/build_and_test_cli.yml | 31 ++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test_cli.yml b/.github/workflows/build_and_test_cli.yml index 9c29120..03cf602 100644 --- a/.github/workflows/build_and_test_cli.yml +++ b/.github/workflows/build_and_test_cli.yml @@ -6,8 +6,8 @@ on: pull_request: jobs: - build-and-test: - name: Build + venv-build-and-test: + name: venv build runs-on: ${{ matrix.os }} @@ -65,3 +65,30 @@ jobs: ls ./output # assert DICOM files exist [ -f "./output/IM_0001.dcm" ] && echo "Output DICOM file exists" || exit 1 + + container-build-and-test: + name: container build + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + python-version: [ '3.9' ] + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Build container + run: | + docker build -t nii2dcm --progress=plain --no-cache . + docker ps + + - name: Test nii2dcm container + run: | + docker run nii2dcm -h + echo "nii2dcm version:" + docker run nii2dcm -v \ No newline at end of file