better ci
This commit is contained in:
parent
dbafea8c3f
commit
82a9014843
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user