51 lines
1.1 KiB
Makefile
51 lines
1.1 KiB
Makefile
|
|
.PHONY: install lint lint-fix test test-jest test-node test-legacy ci docker-ci docker-test docker-lint e2e e2e-up e2e-down
|
||
|
|
|
||
|
|
install:
|
||
|
|
@sed -i 's|"generalFunctions": "git+https://[^"]*"|"generalFunctions": "file:./nodes/generalFunctions"|' package.json
|
||
|
|
npm install
|
||
|
|
@git checkout -- package.json 2>/dev/null || true
|
||
|
|
|
||
|
|
lint:
|
||
|
|
npx eslint nodes/
|
||
|
|
|
||
|
|
lint-fix:
|
||
|
|
npx eslint nodes/ --fix
|
||
|
|
|
||
|
|
test-jest:
|
||
|
|
npx jest --forceExit
|
||
|
|
|
||
|
|
test-node:
|
||
|
|
node --test \
|
||
|
|
nodes/valve/test/basic/*.test.js \
|
||
|
|
nodes/valve/test/edge/*.test.js \
|
||
|
|
nodes/valve/test/integration/*.test.js \
|
||
|
|
nodes/valveGroupControl/test/basic/*.test.js \
|
||
|
|
nodes/valveGroupControl/test/edge/*.test.js \
|
||
|
|
nodes/valveGroupControl/test/integration/*.test.js
|
||
|
|
|
||
|
|
test-legacy:
|
||
|
|
node nodes/machineGroupControl/src/groupcontrol.test.js
|
||
|
|
node nodes/generalFunctions/src/nrmse/errorMetric.test.js
|
||
|
|
|
||
|
|
test: test-jest test-node test-legacy
|
||
|
|
|
||
|
|
ci: lint test
|
||
|
|
|
||
|
|
docker-ci:
|
||
|
|
docker compose run --rm ci
|
||
|
|
|
||
|
|
docker-test:
|
||
|
|
docker compose run --rm test
|
||
|
|
|
||
|
|
docker-lint:
|
||
|
|
docker compose run --rm lint
|
||
|
|
|
||
|
|
e2e:
|
||
|
|
bash test/e2e/run-e2e.sh
|
||
|
|
|
||
|
|
e2e-up:
|
||
|
|
docker compose -f docker-compose.e2e.yml up -d --build
|
||
|
|
|
||
|
|
e2e-down:
|
||
|
|
docker compose -f docker-compose.e2e.yml down
|