Skip to content

Commit 09a4a9d

Browse files
committed
Swap to container for elasticsearch in github actions
1 parent c06ae6b commit 09a4a9d

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.github/workflows/codecov.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
contents: read
2121
pull-requests: write
2222
runs-on: ubuntu-latest
23+
services:
24+
elasticsearch-it:
25+
image: docker.elastic.co/elasticsearch/elasticsearch:8
26+
options: >-
27+
--health-cmd "curl http://localhost:9200/_cluster/health"
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 10
31+
ports:
32+
# <port on host>:<port on container>
33+
- 9200:9200
2334
steps:
2435
- uses: actions/checkout@v3
2536
- name: Set up JDK 11
@@ -28,11 +39,6 @@ jobs:
2839
java-version: '11'
2940
distribution: 'temurin'
3041
cache: maven
31-
- uses: ankane/setup-elasticsearch@v1
32-
with:
33-
elasticsearch-version: 8
34-
config: |
35-
http.port: 9200
3642
- name: Clear existing docker image cache
3743
shell: bash
3844
run: docker image prune -af

.github/workflows/maven.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ jobs:
5757
checks: write
5858
contents: read
5959
runs-on: ubuntu-latest
60+
services:
61+
elasticsearch-it:
62+
image: docker.elastic.co/elasticsearch/elasticsearch:8
63+
options: >-
64+
--health-cmd "curl http://localhost:9200/_cluster/health"
65+
--health-interval 10s
66+
--health-timeout 5s
67+
--health-retries 10
68+
ports:
69+
# <port on host>:<port on container>
70+
- 9200:9200
6071
steps:
6172
- uses: actions/checkout@v3
6273
- name: Set up JDK 11
@@ -65,11 +76,6 @@ jobs:
6576
java-version: '11'
6677
distribution: 'temurin'
6778
cache: maven
68-
- uses: ankane/setup-elasticsearch@v1
69-
with:
70-
elasticsearch-version: 8
71-
config: |
72-
http.port: 9200
7379
- name: Clear existing docker image cache
7480
shell: bash
7581
run: docker image prune -af

0 commit comments

Comments
 (0)