49 lines
1.2 KiB
Makefile
49 lines
1.2 KiB
Makefile
.PHONY = build-git-tag, build, test, test-api, test-ui, demo, stop, run-sc
|
|
|
|
# Creates a git tag to track the version of the API used.
|
|
build-git-tag:
|
|
scripts/gen_git_info.sh
|
|
|
|
# Build the API image
|
|
build: build-git-tag
|
|
docker build \
|
|
--pull \
|
|
--cache-from=dorianpula/rookeries:latest \
|
|
--tag dorianpula/rookeries:latest .
|
|
|
|
# Runs all the tests
|
|
test: build test-api test-ui
|
|
|
|
# Runs API tests
|
|
test-api: stop build
|
|
docker-compose run --no-deps rookeries \
|
|
inv test.python_style
|
|
docker-compose up -d db rookeries
|
|
docker-compose exec rookeries \
|
|
inv db.wait db.init db.upgrade
|
|
docker-compose exec rookeries \
|
|
inv server.wait --timeout 100
|
|
docker-compose exec rookeries \
|
|
inv test.server
|
|
|
|
# Runs UI tests
|
|
test-ui: stop build
|
|
docker-compose run --no-deps rookeries \
|
|
inv test.js_style test.js
|
|
docker-compose up -d
|
|
docker-compose exec rookeries \
|
|
inv db.wait
|
|
docker-compose exec rookeries \
|
|
inv server.wait --timeout 100
|
|
docker-compose exec rookeries \
|
|
inv test.ui
|
|
|
|
# Demos Rookeries in a browser
|
|
demo: build
|
|
docker-compose up -d --remove-orphans
|
|
python -m webbrowser -n http://localhost:5000/
|
|
|
|
# Shuts down Rookeries
|
|
stop:
|
|
docker-compose down --remove-orphans --volumes
|