@@ -104,27 +104,15 @@ jobs:
104
104
run : pnpm build
105
105
working-directory : ./dashboard
106
106
107
- build -django :
107
+ lint-and-unit-test -django :
108
108
if : github.event.pull_request.draft != true
109
109
runs-on : ubuntu-latest
110
110
timeout-minutes : 10
111
111
steps :
112
- - name : Checkout code
113
- uses : actions/checkout@v4
114
-
115
- - name : Set up Python
116
- uses : actions/setup-python@v4
117
- with :
118
- python-version : ' 3.12'
119
-
120
- - name : Install Poetry
121
- run : |
122
- python -m pip install --upgrade pip
123
- pip install poetry
112
+ - uses : actions/checkout@v4
124
113
125
- - name : Install dependencies
126
- run : poetry install
127
- working-directory : ./backend
114
+ - name : Setup Backend
115
+ uses : ./.github/actions/setup-backend
128
116
129
117
- name : Lint
130
118
run : poetry run flake8
@@ -134,6 +122,20 @@ jobs:
134
122
run : poetry run black --check .
135
123
working-directory : ./backend
136
124
125
+ - name : Run unit tests
126
+ run : poetry run pytest -m unit
127
+ working-directory : ./backend
128
+
129
+ integration-test-django :
130
+ if : github.event.pull_request.draft != true
131
+ runs-on : ubuntu-latest
132
+ timeout-minutes : 10
133
+ steps :
134
+ - uses : actions/checkout@v4
135
+
136
+ - name : Setup Backend
137
+ uses : ./.github/actions/setup-backend
138
+
137
139
- name : Configure credentials variables
138
140
run : |
139
141
echo -n "${{ secrets.PG_JSON }}" | base64 --decode > application_default_credentials.json
@@ -160,11 +162,11 @@ jobs:
160
162
break
161
163
fi
162
164
echo "Waiting for backend to be ready... $i"
163
- sleep 10
165
+ sleep 5
164
166
done
165
167
166
- - name : Run tests
167
- run : poetry run pytest --run-all
168
+ - name : Run integration tests
169
+ run : poetry run pytest -m "not unit" - -run-all
168
170
working-directory : ./backend
169
171
170
172
- name : Clean containers
@@ -176,7 +178,8 @@ jobs:
176
178
needs :
177
179
- lint-js
178
180
- build-front
179
- - build-django
181
+ - lint-and-unit-test-django
182
+ - integration-test-django
180
183
steps :
181
184
- name : Configure staging host authenticity
182
185
run : |
0 commit comments