From 82a9014843f005bf8d6f83f8d19d9743622a1671 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Fri, 17 May 2024 22:59:42 -0600 Subject: [PATCH] better ci --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) 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: