-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (55 loc) · 1.75 KB
/
Makefile
File metadata and controls
77 lines (55 loc) · 1.75 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
project_name = electronic-prescription-service-api-regression-tests
.PHONY: test install lint
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
install: install-python install-hooks install-node
install-full: clear-virtualenv install install-playwright
uninstall-full: clear-virtualenv
update: update-poetry update-node install
update-node:
npm update
update-poetry:
poetry update
install-python:
poetry install
install-hooks: install-python
poetry run pre-commit install --install-hooks --overwrite
install-playwright:
playwright install
playwright install-deps
playwright install --force chrome
install-node:
npm ci --ignore-scripts
lint-black:
poetry run black .
lint-pyright:
export PYRIGHT_PYTHON_GLOBAL_NODE=0; poetry run pyright .
lint-flake8:
poetry run flake8 .
lint: lint-black lint-pyright lint-flake8
run-tests: guard-product guard-env
echo "Running Regression Tests"
poetry run python ./runner.py --product=$(product) --env=$(env) --tags=$(tags) --arm64=${arm64}
clear-virtualenv:
rm -f -d -r .venv/
mkdir .venv/
deep-clean:
make clear-virtualenv
find . -name '__pycache__' -type d -prune -exec rm -rf '{}' +
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
pre-commit: git-secrets-docker-setup
poetry run pre-commit run --all-files
git-secrets-docker-setup:
export LOCAL_WORKSPACE_FOLDER=$(pwd)
docker build -f https://raw.githubusercontent.com/NHSDigital/eps-workflow-quality-checks/refs/tags/v4.0.4/dockerfiles/nhsd-git-secrets.dockerfile -t git-secrets .
download-allure-report: guard-GITHUB_RUN_ID
rm -rf allure-report
rm -rf allure-results
gh run download ${GITHUB_RUN_ID}
allure generate
allure open
%:
@$(MAKE) -f /usr/local/share/eps/Mk/common.mk $@