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 bdd8c19
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 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 @@ -35,7 +43,9 @@ jobs:
go-version: ${{ env.go-version }}

- name: Run tests
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
run: |
echo "INDEXER_ELASTIC_URL=http://localhost:${ matrix.elastic-port }" >> "$GITHUB_ENV"
go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
- name: Upload coverage
if: success()
Expand Down

0 comments on commit bdd8c19

Please sign in to comment.