Skip to content

Commit 553f9e7

Browse files
committed
refactor: run unit tests outside of docker
1 parent b34e298 commit 553f9e7

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/tests.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,24 @@ env:
1818
jobs:
1919
api-unit-tests:
2020
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: ./api
2124
steps:
22-
- uses: actions/checkout@v4
25+
- name: "Setup: checkout repository"
26+
uses: actions/checkout@v4
2327

24-
- name: Login to image registry
25-
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin
28+
- name: "Setup: install poetry"
29+
run: pipx install poetry
2630

27-
- name: Build API image
28-
run: |
29-
docker pull $API_IMAGE
30-
docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE
31+
- name: "Setup: add python"
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.12"
35+
cache: "poetry"
3136

32-
- name: Pytest Unit tests
33-
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api pytest --unit
37+
- name: "Run: pytest unit tests"
38+
run: poetry run pytest --unit
3439

3540
api-integration-tests:
3641
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)