Skip to content

Commit dfd2188

Browse files
authored
Separate github actions for load and smoke tests (#405)
1 parent 67c62ca commit dfd2188

File tree

4 files changed

+98
-22
lines changed

4 files changed

+98
-22
lines changed

.github/workflows/integration-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v3
1919
- name: Start compose
20-
run: docker-compose up --build --exit-code-from quest-load
20+
run: docker-compose -f docker-compose-smoke-test.yaml up --build --exit-code-from quest-smoke
2121
- name: Stop compose
2222
if: always()
23-
run: docker-compose down
23+
run: docker-compose -f docker-compose-smoke-test.yaml down

.github/workflows/load-test.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Load tests
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- 'helm/**'
8+
- 'assets/**'
9+
- '**.md'
10+
11+
jobs:
12+
13+
docker-compose-test:
14+
name: Docker Compose based load tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Start compose
20+
run: docker-compose -f docker-compose-load-test.yaml up --build --exit-code-from quest-load
21+
- name: Stop compose
22+
if: always()
23+
run: docker-compose -f docker-compose-load-test.yaml down

docker-compose.yaml renamed to docker-compose-load-test.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,34 +58,15 @@ services:
5858
delay: 20s
5959
max_attempts: 3
6060

61-
quest-smoke:
62-
image: ghcr.io/parseablehq/quest:main
63-
command: ["smoke", "http://parseable:8000", "parseableadmin", "parseableadmin"]
64-
networks:
65-
- parseable-internal
66-
depends_on:
67-
parseable:
68-
condition: service_started
69-
deploy:
70-
restart_policy:
71-
condition: on-failure
72-
delay: 20s
73-
max_attempts: 3
74-
7561
quest-load:
7662
image: ghcr.io/parseablehq/quest:main
7763
command: ["load", "http://parseable:8000", "parseableadmin", "parseableadmin", "20"]
7864
networks:
7965
- parseable-internal
8066
depends_on:
81-
parseable:
82-
condition: service_started
83-
quest-smoke:
84-
condition: service_started
67+
- parseable
8568
deploy:
8669
restart_policy:
8770
condition: on-failure
8871
delay: 20s
8972
max_attempts: 3
90-
91-

docker-compose-smoke-test.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
version: "3.7"
2+
3+
networks:
4+
parseable-internal:
5+
6+
services:
7+
minio:
8+
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
9+
entrypoint:
10+
- sh
11+
- -euc
12+
- |
13+
mkdir -p /tmp/minio/parseable && \
14+
minio server /tmp/minio
15+
environment:
16+
- MINIO_ROOT_USER=parseable
17+
- MINIO_ROOT_PASSWORD=supersecret
18+
- MINIO_UPDATE=off
19+
ports:
20+
- 9000
21+
healthcheck:
22+
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
23+
interval: 15s
24+
timeout: 20s
25+
retries: 5
26+
networks:
27+
- parseable-internal
28+
29+
parseable:
30+
build:
31+
context: .
32+
dockerfile: Dockerfile
33+
command: ["parseable", "s3-store"]
34+
ports:
35+
- 8000
36+
environment:
37+
- P_S3_URL=http://minio:9000
38+
- P_S3_ACCESS_KEY=parseable
39+
- P_S3_SECRET_KEY=supersecret
40+
- P_S3_REGION=us-east-1
41+
- P_S3_BUCKET=parseable
42+
- P_STAGING_DIR=/tmp/data
43+
- P_USERNAME=parseableadmin
44+
- P_PASSWORD=parseableadmin
45+
- P_CHECK_UPDATE=false
46+
networks:
47+
- parseable-internal
48+
healthcheck:
49+
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
50+
interval: 15s
51+
timeout: 20s
52+
retries: 5
53+
depends_on:
54+
- minio
55+
deploy:
56+
restart_policy:
57+
condition: on-failure
58+
delay: 20s
59+
max_attempts: 3
60+
61+
quest-smoke:
62+
image: ghcr.io/parseablehq/quest:main
63+
command: ["smoke", "http://parseable:8000", "parseableadmin", "parseableadmin"]
64+
networks:
65+
- parseable-internal
66+
depends_on:
67+
- parseable
68+
deploy:
69+
restart_policy:
70+
condition: on-failure
71+
delay: 20s
72+
max_attempts: 3

0 commit comments

Comments
 (0)