Skip to content

Commit

Permalink
make integration-test: DOCKER_COMPOSE overrideable
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jan 30, 2024
1 parent 5b433e7 commit 0f1992e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ jobs:
colima start
- name: Test network integration with pytest
run: |
make integration-test
if [[ "${{ matrix.os }}" == "macos"* ]];then
make integration-test DOCKER_COMPOSE=docker-compose
else
make integration-test
fi
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ TESTDIR = $(CURDIR)/tests
PYTEST_ARGS = --continue-on-collection-errors
VERSION = $(shell cat VERSION)

DOCKER_COMPOSE = docker compose

SPHINX_APIDOC =

BUILD_ORDER = ocrd_utils ocrd_models ocrd_modelfactory ocrd_validators ocrd_network ocrd
Expand Down Expand Up @@ -219,10 +221,10 @@ test: assets

INTEGRATION_TEST_IN_DOCKER = docker exec core_test
integration-test:
docker compose -f tests/network/docker-compose.yml up -d
$(DOCKER_COMPOSE) --file tests/network/docker-compose.yml up -d
sleep 20
$(INTEGRATION_TEST_IN_DOCKER) pytest -k 'test_rmq or test_db or test_processing_server' -v
docker compose -f tests/network/docker-compose.yml down --remove-orphans
$(DOCKER_COMPOSE) --file tests/network/docker-compose.yml down --remove-orphans

benchmark:
$(PYTHON) -m pytest $(TESTDIR)/model/test_ocrd_mets_bench.py
Expand Down

0 comments on commit 0f1992e

Please sign in to comment.