-
-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (33 loc) · 1020 Bytes
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Pull Request checks
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-tests:
name: Run pytest tests
runs-on: ubuntu-latest
steps:
- name: checkout project
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: start a postgresql docker container
run: ./start_postgres.sh &
- name: install python
uses: actions/[email protected]
with:
python-version: '3.8'
- name: install packages in a virtual environment
run: |
python -m venv .venv && \
.venv/bin/pip install -r requirements.txt
- name: wait postgres to be ready
timeout-minutes: 10
run: |
while ! (nc -vz 127.0.0.1 5432);do echo "waiting postgres"; sleep 1;done
- name: run tests
# use PYTHONASYNCIODEBUG to ensure all asyncio tasks are closed
run: |
PYTHONASYNCIODEBUG=1 .venv/bin/pytest tests/