Skip to content

Commit

Permalink
add 2nd test step to build-push
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhgn committed Oct 2, 2024
1 parent aba2e2d commit e4e5a4a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/container_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "v*.*.*"

env:
TEST_TAG: ghcr.io/precimed/container_template:test
LATEST_TAG: ghcr.io/precimed/container_template:latest

jobs:
docker:
Expand Down Expand Up @@ -48,12 +48,18 @@ jobs:
with:
context: "{{defaultContext}}:docker"
load: true
tags: ${{ env.TEST_TAG }}
tags: ${{ env.LATEST_TAG }}
file:
./dockerfiles/container_template/Dockerfile
- name: Test

- name: Run unit tests I
run: |
docker run --rm -v ${{ github.workspace }}:/home ${{ env.LATEST_TAG }} py.test -v tests
- name: Run unit tests II
run: |
docker run --rm -v ${{ github.workspace }}:/home ${{ env.TEST_TAG }} py.test -v tests
pip install -r test-requirements.txt
py.test -v tests
- name: Build and push
uses: docker/build-push-action@v6
Expand Down

0 comments on commit e4e5a4a

Please sign in to comment.