diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a8a9ae..a49b7e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,8 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - ci: + prepare: runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 @@ -28,11 +25,31 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max push: false - - name: run pytest - uses: addnab/docker-run-action@v3 - with: - image: teufa:ci - run: pytest + + tests: + runs-on: ubuntu-latest + container: teufa:ci + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + steps: + - run: pytest + + build-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: - name: log in to ghcr.io uses: docker/login-action@v3 with: