File tree Expand file tree Collapse file tree 6 files changed +132
-48
lines changed Expand file tree Collapse file tree 6 files changed +132
-48
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ updates :
3
+ - package-ecosystem : pip
4
+ directory : /
5
+ schedule :
6
+ interval : weekly
7
+ open-pull-requests-limit : 5
8
+ allow :
9
+ - dependency-type : " all"
10
+ groups :
11
+ all-dependencies :
12
+ patterns :
13
+ - " *"
14
+ exclude-patterns :
15
+ - " pytest-asyncio"
16
+
17
+ - package-ecosystem : github-actions
18
+ directory : /
19
+ schedule :
20
+ interval : weekly
21
+
22
+ - package-ecosystem : docker
23
+ directory : /
24
+ schedule :
25
+ interval : weekly
Original file line number Diff line number Diff line change
1
+ name : dev-build
2
+ on :
3
+ workflow_run :
4
+ workflows : ["tests"]
5
+ branches : [main]
6
+ types :
7
+ - completed
8
+
9
+ workflow_dispatch :
10
+ inputs :
11
+ tag :
12
+ description : " Docker image tag"
13
+ required : true
14
+ default : " latest"
15
+
16
+ env :
17
+ IMAGE_TAG : ${{ github.event.inputs.tag || 'latest' }}
18
+
19
+ jobs :
20
+ dev_build :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+
25
+ - name : Login to DockerHub
26
+ uses : docker/login-action@v3
27
+ with :
28
+ username : ${{ secrets.DOCKER_USER }}
29
+ password : ${{ secrets.DOCKER_PASS }}
30
+
31
+ - name : Build and push image
32
+ uses : docker/build-push-action@v5
33
+ with :
34
+ file : Dockerfile
35
+ push : true
36
+ tags : rafsaf/minimal-fastapi-postgres-template:${{ env.IMAGE_TAG }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : Run tests
2
-
1
+ name : tests
3
2
on :
4
3
push :
4
+ branches :
5
+ - " **"
6
+ tags-ignore :
7
+ - " *.*"
5
8
6
9
jobs :
7
- build :
8
- runs-on : ubuntu-20.04
10
+ tests :
11
+ runs-on : ubuntu-latest
9
12
services :
10
13
postgres :
11
14
image : postgres
@@ -17,35 +20,37 @@ jobs:
17
20
--health-timeout 5s
18
21
--health-retries 5
19
22
ports :
20
- - 31234 :5432
23
+ - 5432 :5432
21
24
steps :
22
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v4
23
26
24
27
- name : Set up Python
25
- uses : actions/setup-python@v2
28
+ uses : actions/setup-python@v5
26
29
with :
27
- python-version : " 3.12"
30
+ python-version : " 3.12.2 "
28
31
29
32
- name : Install Poetry
30
33
uses : snok/install-poetry@v1
31
34
with :
32
35
virtualenvs-create : true
33
- virtualenvs-in-project : true
36
+ virtualenvs-in-project : false
37
+ virtualenvs-path : /opt/venv
34
38
35
39
- name : Load cached venv
36
40
id : cached-poetry-dependencies
37
- uses : actions/cache@v2
41
+ uses : actions/cache@v4
38
42
with :
39
- path : . venv
40
- key : venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
43
+ path : /opt/ venv
44
+ key : venv-${{ runner.os }}-python-3.12.2- ${{ hashFiles('poetry.lock') }}
41
45
42
- - name : Run poetry install
46
+ - name : Install dependencies and actiavte virtualenv
43
47
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
44
48
run : |
45
49
poetry install --no-interaction --no-root
46
50
47
51
- name : Run tests
48
52
env :
53
+ SECURITY__JWT_SECRET_KEY : very-not-secret
49
54
DATABASE__HOSTNAME : localhost
50
55
DATABASE__PASSWORD : postgres
51
56
run : |
Original file line number Diff line number Diff line change
1
+ name : type-check
2
+ on :
3
+ push :
4
+ branches :
5
+ - " **"
6
+ tags-ignore :
7
+ - " *.*"
8
+
9
+ jobs :
10
+ type_check :
11
+ strategy :
12
+ matrix :
13
+ check : ["ruff check", "mypy --check", "ruff format --check"]
14
+
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v5
21
+ with :
22
+ python-version : " 3.12.2"
23
+
24
+ - name : Install Poetry
25
+ uses : snok/install-poetry@v1
26
+ with :
27
+ virtualenvs-create : true
28
+ virtualenvs-in-project : true
29
+
30
+ - name : Install Poetry
31
+ uses : snok/install-poetry@v1
32
+ with :
33
+ virtualenvs-create : true
34
+ virtualenvs-in-project : false
35
+ virtualenvs-path : /opt/venv
36
+
37
+ - name : Load cached venv
38
+ id : cached-poetry-dependencies
39
+ uses : actions/cache@v4
40
+ with :
41
+ path : /opt/venv
42
+ key : venv-${{ runner.os }}-python-3.12.2-${{ hashFiles('poetry.lock') }}
43
+
44
+ - name : Install dependencies and actiavte virtualenv
45
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
46
+ run : |
47
+ poetry install --no-interaction --no-root
48
+
49
+ - name : Run ${{ matrix.check }}
50
+ run : |
51
+ poetry run ${{ matrix.check }} .
Original file line number Diff line number Diff line change 1
- FROM python:3.12.1 -slim-bullseye as base
1
+ FROM python:3.12.2 -slim-bullseye as base
2
2
3
3
ENV PYTHONUNBUFFERED 1
4
4
WORKDIR /build
5
5
6
6
# Create requirements.txt file
7
7
FROM base as poetry
8
- RUN pip install poetry==1.7.1
8
+ RUN pip install poetry==1.8.2
9
9
COPY poetry.lock pyproject.toml ./
10
10
RUN poetry export -o /requirements.txt --without-hashes
11
11
You can’t perform that action at this time.
0 commit comments