You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/lint.yml
+51Lines changed: 51 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,27 @@ on:
7
7
8
8
jobs:
9
9
10
+
# 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
11
+
runner-job:
12
+
runs-on: ubuntu-latest
13
+
services:
14
+
# Label used to access the service container
15
+
postgres:
16
+
# Docker Hub image
17
+
image: postgres
18
+
# Provide the password for postgres
19
+
env:
20
+
POSTGRES_PASSWORD: postgres
21
+
# Set health checks to wait until postgres has started
22
+
options: >-
23
+
--health-cmd pg_isready
24
+
--health-interval 10s
25
+
--health-timeout 5s
26
+
--health-retries 5
27
+
ports:
28
+
# Maps tcp port 5432 on service container to the host
29
+
- 5432:5432
30
+
10
31
black:
11
32
runs-on: ubuntu-latest
12
33
steps:
@@ -83,3 +104,33 @@ jobs:
83
104
84
105
- name: Run isort
85
106
run : isort --profile black .
107
+
108
+
109
+
unit-tests:
110
+
runs-on: ubuntu-latest
111
+
strategy:
112
+
matrix:
113
+
python-version: ["3.12"]
114
+
steps:
115
+
- uses: actions/checkout@v4
116
+
with:
117
+
fetch-depth: 0# Needed for versioningit to find the repo version
118
+
- uses: actions/setup-python@v5
119
+
with:
120
+
python-version: ${{ matrix.python-version }}
121
+
122
+
- name: Install dependencies
123
+
run: python -m pip install .[drf]
124
+
125
+
- name: Install dependencies
126
+
run: python -m pip install --upgrade pip
127
+
-r requirements/requirements-dev.in
128
+
-r requirements/requirements-test.in
129
+
130
+
- name: Run unit tests
131
+
run: python3 run_tests.py
132
+
env:
133
+
# The hostname used to communicate with the PostgreSQL service container
0 commit comments