-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (50 loc) · 1.86 KB
/
Copy pathci-integ-test.yml
File metadata and controls
51 lines (50 loc) · 1.86 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
name: Integration Test
on:
pull_request:
push:
branches:
- 'main'
jobs:
tests:
name: "Integration testing"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up iWF environment"
run: docker compose -f script/docker-compose.yml up -d
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5
- name: "Wait for integ Postgres to be ready"
run: |
for i in $(seq 1 30); do
if docker exec iwf-integ-postgres pg_isready -U iwf -d iwf_integ; then
echo "postgres is ready"; exit 0
fi
echo "waiting for postgres... ($i)"; sleep 2
done
echo "postgres did not become ready in time" >&2; exit 1
- name: "Wait for iWF server to be ready"
run: |
# actively wait until the iWF server serves (it depends on Temporal + Elasticsearch being up),
# instead of relying on a fixed sleep which is too short for the full stack to start.
for i in $(seq 1 60); do
code=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://localhost:8801/api/v1/workflow/start || echo 000)
if [ "$code" = "400" ] || [ "$code" = "200" ]; then
echo "iwf-server is ready (http $code)"; exit 0
fi
echo "waiting for iwf-server... ($i, http $code)"; sleep 3
done
echo "iwf-server did not become ready in time" >&2
docker logs iwf-server 2>&1 | tail -50 || true
exit 1
- run: git submodule update --init --recursive && gradle build
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3