From 5aad337d5db9c45b2151a3cea9edccfaf350c96e Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Tue, 30 Jul 2024 16:26:00 +0200 Subject: [PATCH] tests: add opensearch * necessary for the invenio-users-resources package --- .github/workflows/tests.yml | 4 +++- run-tests.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f785314..c37fd031 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,7 @@ jobs: python-version: ["3.9", "3.12"] cache-service: [redis] db-service: [postgresql14, mysql8] + search-service: [opensearch2] include: - db-service: postgresql14 @@ -40,7 +41,8 @@ jobs: env: CACHE: ${{ matrix.cache-service }} DB: ${{ matrix.db-service }} - EXTRAS: tests,admin,${{ matrix.DB_EXTRAS }} + SEARCH: ${{ matrix.search-service }} + EXTRAS: tests,admin,${{ matrix.DB_EXTRAS }},${{ matrix.search-service }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/run-tests.sh b/run-tests.sh index f6ee8e53..bc2d8687 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -44,7 +44,7 @@ fi python -m check_manifest python -m setup extract_messages --output-file /dev/null python -m sphinx.cmd.build -qnN docs docs/_build/html -eval "$(docker-services-cli up --db ${DB:-postgresql} --cache ${CACHE:-redis} --env)" +eval "$(docker-services-cli up --db ${DB:-postgresql} --search ${SEARCH:-opensearch} --cache ${CACHE:-redis} --env)" # Note: expansion of pytest_args looks like below to not cause an unbound # variable error when 1) "nounset" and 2) the array is empty. python -m pytest ${pytest_args[@]+"${pytest_args[@]}"}