Skip to content

Commit 97c6ee8

Browse files
authored
Merge pull request #44 from makinacorpus/py313
Test library against python 3.13
2 parents 66d827e + 2696508 commit 97c6ee8

File tree

1 file changed

+52
-3
lines changed

1 file changed

+52
-3
lines changed

.github/workflows/lint.yml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint source code
1+
name: Lint and test source code
22

33
on:
44
push:
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99

10+
1011
black:
1112
runs-on: ubuntu-latest
1213
steps:
@@ -22,7 +23,7 @@ jobs:
2223
runs-on: ubuntu-latest
2324
strategy:
2425
matrix:
25-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
26+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2627
steps:
2728
- uses: actions/checkout@v4
2829
with:
@@ -39,7 +40,7 @@ jobs:
3940
runs-on: ubuntu-latest
4041
strategy:
4142
matrix:
42-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
43+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
4344
steps:
4445
- uses: actions/checkout@v4
4546
with:
@@ -83,3 +84,51 @@ jobs:
8384

8485
- name: Run isort
8586
run : isort --profile black .
87+
88+
89+
unit-tests:
90+
runs-on: ubuntu-latest
91+
# From https://docs.github.com/en/actions/tutorials/use-containerized-services/create-postgresql-service-containers#configuring-the-runner-job-for-jobs-directly-on-the-runner-machine
92+
services:
93+
# Label used to access the service container
94+
postgres:
95+
# Docker Hub image
96+
image: postgres
97+
# Provide the password for postgres
98+
env:
99+
POSTGRES_PASSWORD: postgres
100+
# Set health checks to wait until postgres has started
101+
options: >-
102+
--health-cmd pg_isready
103+
--health-interval 10s
104+
--health-timeout 5s
105+
--health-retries 5
106+
ports:
107+
# Maps tcp port 5432 on service container to the host
108+
- 5432:5432
109+
strategy:
110+
matrix:
111+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
112+
steps:
113+
- uses: actions/checkout@v4
114+
with:
115+
fetch-depth: 0 # Needed for versioningit to find the repo version
116+
- uses: actions/setup-python@v5
117+
with:
118+
python-version: ${{ matrix.python-version }}
119+
120+
- name: Install dependencies
121+
run: python -m pip install .[drf]
122+
123+
- name: Install dependencies
124+
run: python -m pip install --upgrade pip
125+
-r requirements/requirements-dev.in
126+
-r requirements/requirements-test.in
127+
128+
- name: Run unit tests
129+
run: python3 run_tests.py
130+
env:
131+
# The hostname used to communicate with the PostgreSQL service container
132+
POSTGRES_HOST: localhost
133+
# The default PostgreSQL port
134+
POSTGRES_PORT: 5432

0 commit comments

Comments
 (0)