File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,25 @@ BASE_IMAGE := fedora:latest
2
2
TEST_TARGET ?= ./tests/
3
3
PY_PACKAGE := ogr
4
4
OGR_IMAGE := ogr
5
+ COLOR ?= yes
6
+ COV_REPORT ?= --cov=ogr --cov-report=term-missing
5
7
6
8
build-test-image : recipe.yaml
7
9
ansible-bender build --build-volumes $(CURDIR ) :/src:Z -- ./recipe.yaml $(BASE_IMAGE ) $(OGR_IMAGE )
8
10
9
11
check :
10
12
@# `python3 -m pytest` doesn't work here b/c the way requre overrides import system:
11
13
@# `AttributeError: module 'importlib_metadata' has no attribute 'distributions'
12
- PYTHONPATH=$(CURDIR ) PYTHONDONTWRITEBYTECODE=1 python3 /usr/bin/pytest --verbose --showlocals $(TEST_TARGET )
14
+ PYTHONPATH=$(CURDIR ) PYTHONDONTWRITEBYTECODE=1 python3 /usr/bin/pytest --color= $( COLOR ) -- verbose --showlocals $( COV_REPORT ) $(TEST_TARGET )
13
15
14
16
check-in-container :
15
- podman run --rm -it -v $(CURDIR ) :/src:Z -w /src --env TEST_TARGET $(OGR_IMAGE ) make -e GITHUB_TOKEN=$(GITHUB_TOKEN ) GITLAB_TOKEN=$(GITLAB_TOKEN ) check
17
+ podman run --rm -it \
18
+ -v $(CURDIR ) :/src:Z -w /src \
19
+ --env TEST_TARGET \
20
+ --env COLOR \
21
+ --env COV_REPORT \
22
+ $(OGR_IMAGE ) \
23
+ make -e GITHUB_TOKEN=$(GITHUB_TOKEN ) GITLAB_TOKEN=$(GITLAB_TOKEN ) check
16
24
17
25
shell :
18
26
podman run --rm -ti -v $(CURDIR ) :/src:Z -w /src $(OGR_IMAGE ) bash
Original file line number Diff line number Diff line change 8
8
- python3-pip
9
9
- python3-pygithub
10
10
- python3-gitlab
11
+ - python3-pytest-cov
11
12
become : true
12
13
- name : Install rpmautospec-rpm-macros
13
14
dnf :
You can’t perform that action at this time.
0 commit comments