-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 977 Bytes
/
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
name: Unit tests
on:
pull_request:
branches: [ main ]
workflow_dispatch:
env:
MB__BATCH_SIZE: 10_000
MB__BACKEND_TYPE: postgres
MB__DATASETS_CONFIG: datasets.toml
# PostgreSQL backend settings
MB__POSTGRES__HOST: localhost
MB__POSTGRES__PORT: 5432
MB__POSTGRES__USER: matchbox_user
MB__POSTGRES__PASSWORD: matchbox_password
MB__POSTGRES__DATABASE: matchbox
MB__POSTGRES__DB_SCHEMA: mb
jobs:
run-unit-tests:
name: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Set up PostgreSQL
run: |
docker compose up -d --wait
- name: Run pytest
run: |
uv run pytest
- name: Dump docker logs
if: failure()
uses: jwalton/gh-docker-logs@v2