-
-
Notifications
You must be signed in to change notification settings - Fork 8
89 lines (76 loc) · 2.45 KB
/
Copy pathkeploy-e2e.yml
File metadata and controls
89 lines (76 loc) · 2.45 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Keploy E2E on PR
on:
pull_request:
branches: [ main ]
permissions:
contents: read
concurrency:
group: keploy-e2e-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
keploy-e2e:
name: Install Keploy, build, and run tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Show Docker and Compose versions
run: |
docker --version
docker compose version
- name: Install Keploy CLI
shell: bash
run: |
set -euo pipefail
curl --silent -O -L https://keploy.io/install.sh
# Source in current shell so the script can modify PATH for this step if needed
source install.sh
# Verify installation
command -v keploy
keploy version || true
- name: Build Docker images (compose)
run: |
docker compose build --pull
- name: Run Keploy tests against docker compose
env:
# Increase Docker's default logs size to keep useful output (optional)
COMPOSE_HTTP_TIMEOUT: "200"
run: |
# Run keploy with the provided command and options
keploy test -c "docker compose up" \
--container-name="user_service" \
--path="./user_service" \
--config-path="./user_service" \
--delay 20 \
-t atg
- name: Upload Keploy artifacts (user_service)
if: always()
uses: actions/upload-artifact@v4
with:
name: keploy-user_service-artifacts
path: |
user_service/keploy/**
if-no-files-found: warn
retention-days: 7
- name: Upload service coverage (optional)
if: always()
uses: actions/upload-artifact@v4
with:
name: service-coverage
path: |
coverage/**
apigateway/coverage/**
user_service/coverage/**
product_service/coverage/**
order_service/coverage/**
if-no-files-found: ignore
retention-days: 7
- name: Teardown docker compose
if: always()
run: |
docker compose ps
docker compose logs --no-color | tail -n 200 || true
docker compose down -v --remove-orphans