-
Notifications
You must be signed in to change notification settings - Fork 38
52 lines (50 loc) · 1.31 KB
/
tests.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Run unit tests
on:
push:
branches: [develop]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pytest
POSTGRES_PORT: 5432
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.11']
env:
# default: multiprocessing
# threading is more stable on GitHub Actions
BOLT_PYTHON_MOCK_SERVER_MODE: threading
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install -r requirements.txt
pip3 install "pytest>=7.1.2"
pip3 install "pytest-mock>=3.10.0"
pip3 install "pytest-env>=0.8.1"
- name: Run tests
run: |
pytest -vv tests/