-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.19 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.19 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
39
CODECOV_UPLOAD_TOKEN ?= "notset"
CODECOV_URL ?= "https://api.codecov.io"
CODECOV_FLAG ?= ""
full_sha := $(shell git rev-parse HEAD)
# We allow this to be overridden so that we can run `pytest` from this directory
# but have the junit file use paths relative to a parent directory. This will
# help us move to a monorepo.
PYTEST_ROOTDIR ?= "."
export CODECOV_TOKEN=${CODECOV_UPLOAD_TOKEN}
.ONESHELL:
test:
# Emit coverage/junit files inside the bind-mounted `test` directory
docker compose exec shared uv run pytest --cov-report=xml:tests/unit.coverage.xml --junitxml=tests/unit.junit.xml -o junit_family=legacy -c pytest.ini --rootdir=${PYTEST_ROOTDIR}
test.path:
docker compose exec shared uv run pytest $(TEST_PATH)
requirements.install:
uv sync
. .venv/bin/activate
test_env.install_cli:
pip install codecov-cli
test_env.build:
docker compose build
test_env.up:
docker compose up -d
test_env.test:
# Emit coverage/junit files inside the bind-mounted `test` directory
docker compose exec shared uv run pytest -c pytest.ini --rootdir=${PYTEST_ROOTDIR} --cov ./shared --cov-report=xml:tests/unit.coverage.xml --junitxml=tests/unit.junit.xml -o junit_family=legacy
test_env.down:
docker compose down