switch to inline tests

This commit is contained in:
Brian Rosner 2024-05-21 08:15:16 -06:00
parent f2ac6f2ad1
commit 8ce98368da

View File

@ -38,23 +38,20 @@ jobs:
- 5432:5432 - 5432:5432
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup docker buildx - name: Setup Python
uses: docker/setup-buildx-action@v3 uses: actions/setup-python@v5
- name: Build container image
uses: docker/build-push-action@v5
with: with:
push: false python-version: "3.12"
tags: ${{ env.IMAGE_NAME }}:ci - name: Setup poetry
target: ci uses: abatilo/actions-poetry@v2
load: true with:
cache-from: type=gha poetry-version: "1.8.3"
cache-to: type=gha,mode=max - name: Install dependencies
run: poetry install --with=test
- name: Run pytest - name: Run pytest
uses: addnab/docker-run-action@v3 run: pytest --cov=teufa tests/
with: env:
image: ${{ env.IMAGE_NAME }}:ci DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
options: -v ${{ github.workspace }}:/work -e DATABASE_URL=postgresql+psycopg://postgres:postgres@postgres:5432/postgres
run: pytest --cov=teufa tests/
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4.0.1
with: with: