Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ env:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 10
strategy:
matrix:
docker-compose:
- 'containers/docker-compose.yml'
- 'containers/es7/docker-compose.yml'
include:
- docker-compose: 'containers/docker-compose.yml'
test-engines: 'all'
name: 'ES7 + OpenSearch 2 + OpenSearch 3'
- docker-compose: 'containers/es7/docker-compose.yml'
test-engines: 'es'
name: 'Elasticsearch 7 only'
name: Test (${{ matrix.name }})
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,7 +42,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
# ES5 needs this
# ES needs this
- run: sudo sysctl -w vm.max_map_count=262144
# create log & bin dir if missing
- run: mkdir -p $LOG_DIR
Expand All @@ -46,10 +51,40 @@ jobs:
- run: docker compose -f ${{ matrix.docker-compose }} logs -f > $COMPOSE_LOG &
- run: docker compose -f ${{ matrix.docker-compose }} ps

# Wait ES
- run: until curl http://127.0.0.1:9207/; do sleep 1; done
# Wait for ES to be ready
- name: Wait for Elasticsearch
run: |
until curl -u elastic:ductile http://127.0.0.1:9207/_cluster/health; do
echo "Waiting for Elasticsearch..."
sleep 2
done
timeout-minutes: 2

# Wait for OpenSearch if testing all engines
- name: Wait for OpenSearch 2
if: matrix.test-engines == 'all'
run: |
until curl http://127.0.0.1:9202/_cluster/health; do
echo "Waiting for OpenSearch 2..."
sleep 2
done
timeout-minutes: 2

- name: Wait for OpenSearch 3
if: matrix.test-engines == 'all'
run: |
until curl http://127.0.0.1:9203/_cluster/health; do
echo "Waiting for OpenSearch 3..."
sleep 2
done
timeout-minutes: 2

- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.5
with:
lein: latest
- run: lein do clean, javac, test :all, with-profile test-encoding test

- name: Run tests
env:
DUCTILE_TEST_ENGINES: ${{ matrix.test-engines }}
run: lein do clean, javac, test :all, with-profile test-encoding test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ pom.xml.asc
.hg/
*.log
.lsp/.cache/
.clj-kondo/.cache/
Loading