mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(ci): Be explicit about service start order (#3673)
This will prevent services from restarting out from under us during tests. Service restarts should be explicitly tested as integration tests. Should fix #3666
This commit is contained in:
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -203,7 +203,14 @@ jobs:
|
||||
- name: Seed database
|
||||
run: docker compose run elixir /bin/sh -c 'cd apps/domain && mix ecto.seed'
|
||||
- name: Start docker compose in the background
|
||||
run: docker compose up -d api web client relay gateway dns.httpbin httpbin
|
||||
run: |
|
||||
# TODO: Order matters here, but it shouldn't. There seems to be some race
|
||||
# condition involved in letting Docker deterime the start order here.
|
||||
docker compose up -d dns.httpbin httpbin
|
||||
docker compose up -d api web
|
||||
docker compose up -d relay
|
||||
docker compose up -d gateway
|
||||
docker compose up -d client
|
||||
|
||||
- run: ./scripts/tests/${{ matrix.test }}.sh
|
||||
|
||||
@@ -255,13 +262,19 @@ jobs:
|
||||
docker compose run elixir /bin/sh -c 'cd apps/domain && mix ecto.seed'
|
||||
- name: Start docker compose in the background
|
||||
run: |
|
||||
docker compose up -d \
|
||||
api \
|
||||
web \
|
||||
client \
|
||||
relay \
|
||||
gateway \
|
||||
iperf3
|
||||
# We need to increase the log level to make sure that they don't hold off storm of packets
|
||||
# generated by UDP tests. Wire is especially chatty.
|
||||
sed -i 's/^\(\s*\)RUST_LOG:.*$/\1RUST_LOG: wire=error,info/' docker-compose.yml
|
||||
cat docker-compose.yml | grep RUST_LOG
|
||||
|
||||
# TODO: Order matters here, but it shouldn't. There seems to be some race
|
||||
# condition involved in letting Docker deterime the start order here.
|
||||
docker compose up -d iperf3
|
||||
docker compose up -d api web
|
||||
docker compose up -d relay
|
||||
docker compose up -d gateway
|
||||
docker compose up -d client
|
||||
|
||||
- name: 'Setup test: ${{ matrix.test_name }}'
|
||||
run: ${{ matrix.setup }}
|
||||
- name: 'Execute test: ${{ matrix.test_name }}'
|
||||
@@ -272,12 +285,6 @@ jobs:
|
||||
run: |
|
||||
set -xe
|
||||
|
||||
# We need to increase the log level to make sure that they don't hold off storm of packets
|
||||
# generated by UDP tests. Wire is especially chatty.
|
||||
sed -i 's/^\(\s*\)RUST_LOG:.*$/\1RUST_LOG: wire=error,info/' docker-compose.yml
|
||||
cat docker-compose.yml | grep RUST_LOG
|
||||
docker compose up -d client gateway relay
|
||||
|
||||
mkdir -p /tmp/iperf3results
|
||||
docker compose exec --env RUST_LOG=info -it client /bin/sh -c 'iperf3 -O 1 -R -c 172.20.0.110 --json' >> /tmp/iperf3results/tcp_server2client.json
|
||||
cat /tmp/iperf3results/tcp_server2client.json | jq -r '"tcp_server2client_sum_received_bits_per_second=" + (.end.sum_received.bits_per_second|tostring)' >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -128,8 +128,6 @@ services:
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
depends_on:
|
||||
gateway:
|
||||
condition: "service_healthy"
|
||||
api:
|
||||
condition: "service_healthy"
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user