File tree 4 files changed +53
-99
lines changed
4 files changed +53
-99
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [main]
6
+ push :
7
+ branches : [main]
8
+
9
+ env :
10
+ REGISTRY : ghcr.io
11
+ IMAGE_NAME : ${{ github.repository }}
12
+
13
+ jobs :
14
+ pre-commit :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - uses : actions/setup-python@v5
19
+ with :
20
+ python-version : " 3.12"
21
+ -
uses :
pre-commit/[email protected]
22
+ tests :
23
+ runs-on : ubuntu-latest
24
+ services :
25
+ postgres :
26
+ image : postgres
27
+ env :
28
+ POSTGRES_PASSWORD : postgres
29
+ options : >-
30
+ --health-cmd pg_isready
31
+ --health-interval 10s
32
+ --health-timeout 5s
33
+ --health-retries 5
34
+ ports :
35
+ - 5432:5432
36
+ steps :
37
+ - uses : actions/checkout@v4
38
+ - name : Setup docker buildx
39
+ uses : docker/setup-buildx-action@v3
40
+ - name : Build container image
41
+ uses : docker/build-push-action@v5
42
+ with :
43
+ push : false
44
+ tags : ${{ env.IMAGE_NAME }}:ci
45
+ target : ci
46
+ load : true
47
+ cache-from : type=gha
48
+ cache-to : type=gha,mode=max
49
+ - name : Run pytest
50
+ uses : addnab/docker-run-action@v3
51
+ with :
52
+ image : ${{ env.IMAGE_NAME }}:ci
53
+ run : pytest
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments