Skip to content

Commit

Permalink
Test against Elastic 7 and 8
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 13, 2024
1 parent 334038a commit 64686c8
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
elastic-port: [9207, 9208]

services:
postgres:
Expand All @@ -17,13 +20,18 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
elastic:
image: elasticsearch:7.17.9
ports:
- 9200:9200
- 9300:9300
env:
discovery.type: single-node
elastic7:
image: elasticsearch:7.17.9
ports:
- 9207:9200
env:
discovery.type: single-node
elastic8:
image: elasticsearch:8.13.4
ports:
- 9208:9200
env:
discovery.type: single-node

steps:
- name: Checkout code
Expand All @@ -34,6 +42,10 @@ jobs:
with:
go-version: ${{ env.go-version }}

- name: Setup environment
run: |
echo "INDEXER_ELASTIC_URL=http://localhost:${{ matrix.elastic-port }}" >> "$GITHUB_ENV"
- name: Run tests
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...

Expand Down

0 comments on commit 64686c8

Please sign in to comment.