-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.28 KB
/
Copy pathcoverage.yml
File metadata and controls
38 lines (37 loc) · 1.28 KB
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
name: "Coverage"
on: [push]
jobs:
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --group coverage --group tests --group init_bo4e
- name: Set up test database
run: |
cd src
uv run python -m borm.db.postgresql_db.create_env_file
docker compose -f borm/db/postgresql_db/docker-compose.yaml up -d
- name: Pull and generate BO4E models
run: |
mkdir -p bo4e_schemas
cd bo4e_schemas
uv run bost -t v202401.0.1 -o ./
uv run bo4e-generator -i ./ -o ../src/borm/models -ot sql_model
- name: Run Tests and Record Coverage
run: |
cd tests
uv run python -m borm
uv run coverage run -m pytest
uv run coverage html --omit tests/*,src/borm/models/*
uv run coverage report --fail-under 80 --omit tests/*,src/borm/models/*
- name: Tear down test database
run: docker compose -f src/borm/db/postgresql_db/docker-compose.yaml down -v