Skip to content

Commit

Permalink
test_: docker compose refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarbu15 committed Feb 28, 2025
1 parent 9342106 commit 6b871c5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 150 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-reliability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
config:
- name: ipv4
docker_compose_file: docker-compose.test.reliability.yml
docker_compose_file: docker-compose.test.reliability.ipv4.yml
use_ipv6: "No"
- name: ipv6
docker_compose_file: docker-compose.test.reliability.ipv6.yml
Expand All @@ -46,7 +46,7 @@ jobs:
run: pip install -r tests-functional/requirements.txt

- name: Build status-backend
run: cd tests-functional; docker compose -f ${{ matrix.config.docker_compose_file }} up --build --remove-orphans -d
run: cd tests-functional; docker compose -f docker-compose.anvil.yml -f docker-compose.test.status-go.yml -f ${{ matrix.config.docker_compose_file }} up --build --remove-orphans -d

- name: Run tests
env:
Expand Down
31 changes: 31 additions & 0 deletions tests-functional/docker-compose.test.reliability.ipv4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: "3.9"

networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.11.0.0/24

services:
anvil:
networks:
- default

deploy-sntv2:
networks:
- default

deploy-communities-contracts:
networks:
- default

status-backend:
entrypoint: [
"status-backend",
"--address", "0.0.0.0:3333"
]
healthcheck:
test: ["CMD-SHELL", "curl -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":1}' -H 'Content-Type: application/json' http://0.0.0.0:3333 || exit 1"]
networks:
- default
60 changes: 1 addition & 59 deletions tests-functional/docker-compose.test.reliability.ipv6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,81 +12,23 @@ networks:

services:
anvil:
image: ghcr.io/foundry-rs/foundry:latest
platform: linux/amd64
command:
- anvil --host 0.0.0.0 --block-time 2
ports:
- 8545:8545
networks:
- default

deploy-sntv2:
platform: linux/amd64
environment:
- API_KEY_ETHERSCAN="" # API_KEY env var is required, but value isn't used
- GITHUB_ORG=status-im
- GITHUB_REPO=status-network-token-v2
depends_on:
- anvil
build:
context: .
dockerfile: Dockerfile
command: |
forge script script/Deploy.s.sol
--broadcast
--fork-url=http://anvil:8545
--private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
networks:
- default

deploy-communities-contracts:
platform: linux/amd64
environment:
- API_KEY_ETHERSCAN=""
- API_KEY_ARBISCAN=""
- API_KEY_OPTIMISTIC_ETHERSCAN=""
- GITHUB_ORG=status-im
- GITHUB_REPO=communities-contracts
depends_on:
deploy-sntv2:
condition: service_completed_successfully
build:
context: .
dockerfile: Dockerfile
command: |
forge script script/DeployContracts.s.sol
--broadcast
--fork-url=http://anvil:8545
--private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
--sender=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
networks:
- default

status-backend:
user: ${INTEGRATION_TESTS_DOCKER_UID}
build:
context: ../
dockerfile: _assets/build/Dockerfile
args:
build_tags: gowaku_no_rln,enable_private_api
build_target: status-backend
build_flags: -cover
entrypoint: [
"status-backend",
"--address", "[::]:3333",
"--address", "[::]:3333"
]
healthcheck:
test: ["CMD-SHELL", "curl -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":1}' -H 'Content-Type: application/json' http://[::1]:3333 || exit 1"]
interval: 5s
timeout: 2s
retries: 120
environment:
GOCOVERDIR: "/coverage/binary"
volumes:
- ./coverage/binary:/coverage/binary
ports:
- 3314-3324:3333
stop_signal: SIGINT
networks:
- default
89 changes: 0 additions & 89 deletions tests-functional/docker-compose.test.reliability.yml

This file was deleted.

0 comments on commit 6b871c5

Please sign in to comment.