Skip to content

Commit 82a9014

Browse files
committed
better ci
1 parent dbafea8 commit 82a9014

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

.github/workflows/ci.yml

+26-9
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ env:
1010
IMAGE_NAME: ${{ github.repository }}
1111

1212
jobs:
13-
ci:
13+
prepare:
1414
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
packages: write
1815
steps:
1916
- uses: actions/checkout@v4
2017
- uses: docker/setup-buildx-action@v3
@@ -28,11 +25,31 @@ jobs:
2825
cache-from: type=gha
2926
cache-to: type=gha,mode=max
3027
push: false
31-
- name: run pytest
32-
uses: addnab/docker-run-action@v3
33-
with:
34-
image: teufa:ci
35-
run: pytest
28+
29+
tests:
30+
runs-on: ubuntu-latest
31+
container: teufa:ci
32+
services:
33+
postgres:
34+
image: postgres
35+
env:
36+
POSTGRES_PASSWORD: postgres
37+
options: >-
38+
--health-cmd pg_isready
39+
--health-interval 10s
40+
--health-timeout 5s
41+
--health-retries 5
42+
ports:
43+
- 5432:5432
44+
steps:
45+
- run: pytest
46+
47+
build-push:
48+
runs-on: ubuntu-latest
49+
permissions:
50+
contents: read
51+
packages: write
52+
steps:
3653
- name: log in to ghcr.io
3754
uses: docker/login-action@v3
3855
with:

0 commit comments

Comments
 (0)