-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
55 lines (44 loc) · 1.37 KB
/
Makefile
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
55
CODECOV_UPLOAD_TOKEN ?= "notset"
CODECOV_URL ?= "https://api.codecov.io"
CODECOV_FLAG ?= ""
full_sha := $(shell git rev-parse HEAD)
export CODECOV_TOKEN=${CODECOV_UPLOAD_TOKEN}
.ONESHELL:
test:
docker compose exec shared python -m pytest --cov=./
lint:
make lint.install
make lint.run
lint.install:
echo "Installing..."
pip install -Iv black==22.3.0 isort
lint.run:
black .
isort --profile black .
lint.check:
echo "Linting..."
black --check .
echo "Sorting..."
isort --profile black --check .
requirements.install:
python -m venv venv
. venv/bin/activate
pip install -r tests/requirements.txt
pip install -r requirements.txt
python setup.py develop
pip install codecov-cli
test_env.install_cli:
pip install codecov-cli
test_env.mutation:
docker-compose exec shared sh -c 'git fetch --no-tags --prune --depth=1 origin main:refs/remotes/origin/main'
docker-compose exec shared sh -c 'git diff origin/main ${full_sha} > data.patch'
docker-compose exec shared sh -c 'pip install mutmut[patch]'
docker-compose exec shared sh -c 'mutmut run --use-patch-file data.patch || true'
docker-compose exec shared sh -c 'mkdir /tmp/artifacts;'
docker-compose exec shared sh -c 'mutmut junitxml > /tmp/artifacts/mut.xml'
test_env.build:
docker-compose build
test_env.up:
docker-compose up -d
test_env.test:
docker-compose exec shared python -m pytest --cov=./ --junitxml=junit.xml