-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 2.08 KB
/
e2e.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: "e2e"
on:
workflow_dispatch:
push:
branches: ["main"]
tags:
- "v*"
pull_request:
branches: ["main"]
env:
DOCKER_REGISTRY: ghcr.io/trifork/
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PACKAGE_PAT }} # we need this, as GITHUB_TOKEN only have permission to its own repo
# OpenSearch is required for integration tests
#- name: docker network create cheetah-infrastructure
# run: docker network create cheetah-infrastructure
- name: Run development environment
run: docker compose up --quiet-pull --force-recreate -d
- name: Start mye2eclient container in shared network
run: docker run -d -v "${PWD}/tests/:/opt/tests/" -it --name mye2eclient --network=cheetah-infrastructure alpine:latest
- name: Setup mye2eclient container
run: |
docker exec mye2eclient apk add curl jq bash httpie
- name: "Wait for opensearch, the slowest component"
uses: nick-fields/retry@v2
with:
timeout_minutes: 3
max_attempts: 25
retry_wait_seconds: 5
warning_on_retry: false
command: 'docker exec mye2eclient curl -sS -X GET -H "Content-Type: application/json" http://admin:admin@opensearch:9200/_cat/indices'
- name: Check docker health
run: |
echo $(docker compose ps -a | grep 'unhealthy')
docker compose ps -a | grep 'unhealthy' && echo "Services unhealthy" && exit 1 || exit 0
- name: opensearch test
run: docker exec mye2eclient bash /opt/tests/opensearch.sh
- name: kafka test
run: docker exec mye2eclient bash /opt/tests/kafka.sh
- name: schemaregistry test
run: docker exec mye2eclient bash /opt/tests/schemaregistry.sh
#- name: "see logs"
# run: docker logs cheetah-lib-templates-java-e2e-job-name-job