Skip to content

Commit

Permalink
test using py.test inner and outer scope
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhgn committed Oct 2, 2024
1 parent 63d7d1b commit 43a262c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/container_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest

0 comments on commit 43a262c

Please sign in to comment.