diff --git a/.github/workflows/container_build.yml b/.github/workflows/container_build.yml index 5c141da..db56b62 100644 --- a/.github/workflows/container_build.yml +++ b/.github/workflows/container_build.yml @@ -10,7 +10,7 @@ on: tags: - "v*.*.*" env: - TEST_TAG: ghcr.io/precimed/container_template:test + LATEST_TAG: ghcr.io/precimed/container_template:latest jobs: docker: @@ -51,13 +51,18 @@ jobs: with: context: "{{defaultContext}}:docker" load: true - tags: ${{ env.TEST_TAG }} + tags: ${{ env.LATEST_TAG }} file: ./dockerfiles/container_template/Dockerfile - - name: Run unit tests + - name: Run unit tests I run: | - docker run --rm -v ${{ github.workspace }}:/home ${{ env.TEST_TAG }} py.test -v tests + docker run --rm -v ${{ github.workspace }}:/home ${{ env.LATEST_TAG }} py.test -v tests + + - name: Run unit tests II + run: | + pip install -r test-requirements.txt + py.test -v tests - name: Build uses: docker/build-push-action@v6 diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..e079f8a --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +pytest