forked from bizon-data/bizon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.1 KB
/
pytest.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
53
54
name: Pytest bizon
on:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
container: python:3.10
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: bizon
POSTGRES_DB: bizon_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d bizon_test"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: |
pip install poetry
- name: Configure Poetry for CI
run: |
poetry config virtualenvs.create false
- name: Install dependencies
run: |
poetry install --with test --all-extras
- name: Run tests
run: |
POETRY_ENV_TEST=CI poetry run pytest tests/
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: postgres
# The default PostgreSQL port
POSTGRES_PORT: 5432