mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Removing the check to get Rust PRs to pass. **Note**: #2182 was dependent on this one, and has since merged into this one.
79 lines
3.1 KiB
YAML
79 lines
3.1 KiB
YAML
name: Integration Tests
|
|
on:
|
|
merge_group:
|
|
types: [checks_requested]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
integration-test_basic-flow:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build images
|
|
uses: docker/bake-action@v4.0.0
|
|
with:
|
|
set: |
|
|
elixir.cache-from=scope=elixir,type=gha
|
|
elixir.cache-to=scope=elixir,type=gha,mode=max
|
|
api.cache-from=scope=api,type=gha
|
|
api.cache-to=scope=api,type=gha,mode=max
|
|
web.cache-from=scope=web,type=gha
|
|
web.cache-to=scope=web,type=gha,mode=max
|
|
client.cache-from=scope=rust,type=gha
|
|
client.cache-to=scope=rust,type=gha,mode=max
|
|
gateway.cache-from=scope=rust,type=gha
|
|
gateway.cache-to=scope=rust,type=gha,mode=max
|
|
relay.cache-from=scope=rust,type=gha
|
|
relay.cache-to=scope=rust,type=gha,mode=max
|
|
files: docker-compose.yml
|
|
push: false
|
|
- 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
|
|
- name: Test that client can ping resource
|
|
run: docker compose exec -it client timeout 60 bash -c 'until ping -W 1 -c 1 172.20.0.100 &>/dev/null; do true; done'
|
|
|
|
|
|
integration-test_relayed-flow:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build images
|
|
uses: docker/bake-action@v4.0.0
|
|
with:
|
|
set: |
|
|
elixir.cache-from=scope=elixir,type=gha
|
|
elixir.cache-to=scope=elixir,type=gha,mode=max
|
|
api.cache-from=scope=api,type=gha
|
|
api.cache-to=scope=api,type=gha,mode=max
|
|
web.cache-from=scope=web,type=gha
|
|
web.cache-to=scope=web,type=gha,mode=max
|
|
client.cache-from=scope=rust,type=gha
|
|
client.cache-to=scope=rust,type=gha,mode=max
|
|
gateway.cache-from=scope=rust,type=gha
|
|
gateway.cache-to=scope=rust,type=gha,mode=max
|
|
relay.cache-from=scope=rust,type=gha
|
|
relay.cache-to=scope=rust,type=gha,mode=max
|
|
files: docker-compose.yml
|
|
push: false
|
|
- 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
|
|
# This rule forces to use the relay between client and gateway.
|
|
#
|
|
- name: Disallow traffic between gateway and client container
|
|
run: |
|
|
sudo iptables -I FORWARD 1 -s 172.28.0.100 -d 172.28.0.105 -j DROP
|
|
sudo iptables -I FORWARD 1 -s 172.28.0.105 -d 172.28.0.100 -j DROP
|
|
- name: Test that client can ping resource
|
|
run: docker compose exec -it client timeout 60 bash -c 'until ping -W 1 -c 1 172.20.0.100 &>/dev/null; do true; done'
|