Skip to content
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
5f402c6
import devnet
kukkok3 Sep 11, 2025
8bcd8eb
fix cspell
kukkok3 Sep 11, 2025
49675f8
adds docker compose overlay for localhost
kukkok3 Sep 11, 2025
6b90c98
Merge branch 'main' into feat/runs-schemathesis-on-devnet
kukkok3 Sep 11, 2025
60bbaef
adds devnet test job
kukkok3 Sep 11, 2025
37adedc
Merge branch 'feat/runs-schemathesis-on-devnet' of https://github.com…
kukkok3 Sep 11, 2025
83e8ada
refactor en variables
kukkok3 Sep 12, 2025
780c46d
move env variable
kukkok3 Sep 12, 2025
18e23dc
adds test key
kukkok3 Sep 16, 2025
c16a7d9
comment out uneeded jobs
kukkok3 Sep 16, 2025
621075b
Merge branch 'main' into feat/runs-schemathesis-on-devnet
kukkok3 Sep 16, 2025
5050c0c
adds key
kukkok3 Sep 16, 2025
82a0628
rerun
kukkok3 Sep 16, 2025
ba1527e
comment out cleaning up
kukkok3 Sep 16, 2025
839724c
update
kukkok3 Nov 14, 2025
e6da934
test 1
oldGreg5 Nov 17, 2025
31be0de
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 17, 2025
cf389c3
test 2
oldGreg5 Nov 17, 2025
e0e25fb
test 3
oldGreg5 Nov 17, 2025
b721e18
test 3
oldGreg5 Nov 17, 2025
e6c8b6f
test 3
oldGreg5 Nov 17, 2025
56bf9df
test 3
oldGreg5 Nov 17, 2025
7670832
test 4
oldGreg5 Nov 17, 2025
392c0bd
test 4
oldGreg5 Nov 17, 2025
c928365
test 4
oldGreg5 Nov 17, 2025
046171e
test 4
oldGreg5 Nov 17, 2025
7852adf
test 4
oldGreg5 Nov 17, 2025
b460a05
test 4
oldGreg5 Nov 17, 2025
fba5bc9
test 4
oldGreg5 Nov 17, 2025
ab3d2f0
test 4
oldGreg5 Nov 17, 2025
fff2fb3
test 4
oldGreg5 Nov 17, 2025
fadc618
test 4
oldGreg5 Nov 17, 2025
67d6551
test 4
oldGreg5 Nov 17, 2025
6c522fc
test 4
oldGreg5 Nov 17, 2025
42ea30a
test 4
oldGreg5 Nov 17, 2025
c8eeefa
test 4
oldGreg5 Nov 17, 2025
d1f28aa
test 4
oldGreg5 Nov 17, 2025
aec3139
test 4
oldGreg5 Nov 17, 2025
234d561
test 4
oldGreg5 Nov 17, 2025
db3b65f
test 4
oldGreg5 Nov 17, 2025
b0c2a25
test 4
oldGreg5 Nov 17, 2025
e1fbc47
test 4
oldGreg5 Nov 17, 2025
006031a
test 4
oldGreg5 Nov 17, 2025
061b586
test 5
oldGreg5 Nov 17, 2025
b982250
test 5
oldGreg5 Nov 17, 2025
356901f
test 6
oldGreg5 Nov 18, 2025
d8f1517
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 18, 2025
4631ae2
test 7
oldGreg5 Nov 18, 2025
bf958f5
updates gitignore
kukkok3 Nov 18, 2025
2770b32
use qa 0.0.3
oldGreg5 Nov 25, 2025
9e93c3c
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 25, 2025
0f1ba63
try 1 separate docker compose
oldGreg5 Nov 26, 2025
acbb6f5
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 26, 2025
b4abd68
try 2 separate docker compose
oldGreg5 Nov 26, 2025
691fad6
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 26, 2025
1306457
try 3 separate docker compose
oldGreg5 Nov 26, 2025
f7e6fe4
try 4 separate docker compose
oldGreg5 Nov 26, 2025
f362eaf
try 5 separate docker compose
oldGreg5 Nov 26, 2025
a370821
try 5 separate docker compose
oldGreg5 Nov 26, 2025
4c843d6
try 6 add devnet smoke tests
oldGreg5 Nov 26, 2025
f70be9c
try 7 add devnet smoke tests
oldGreg5 Nov 26, 2025
36327e5
cleanup
oldGreg5 Nov 27, 2025
1420522
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 27, 2025
06d10d1
cleanup
oldGreg5 Nov 27, 2025
c052bc2
cleanup 2
oldGreg5 Nov 27, 2025
fca749c
Merge branch 'refs/heads/main' into feat/runs-schemathesis-on-devnet
oldGreg5 Nov 28, 2025
b9ebb3e
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 1, 2025
ede6f27
cleanup 3
oldGreg5 Dec 1, 2025
2f518c2
Merge remote-tracking branch 'origin/feat/runs-schemathesis-on-devnet…
oldGreg5 Dec 1, 2025
269169a
cleanup 4
oldGreg5 Dec 1, 2025
b0699d9
remove devnet smoke tests
oldGreg5 Dec 1, 2025
7880a71
cleanup 1
oldGreg5 Dec 1, 2025
9e09702
Merge branch 'main' into feat/runs-schemathesis-on-devnet
kukkok3 Dec 2, 2025
ebc3bd3
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 2, 2025
2d2373e
PR comments
oldGreg5 Dec 2, 2025
3d690fb
Merge remote-tracking branch 'origin/feat/runs-schemathesis-on-devnet…
oldGreg5 Dec 2, 2025
380634f
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 2, 2025
24b1fc3
cleanup
oldGreg5 Dec 2, 2025
4450322
cleanup 2
oldGreg5 Dec 2, 2025
e284b2f
cleanup 2
oldGreg5 Dec 2, 2025
900ad2e
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 2, 2025
92d73bc
try build without cache
oldGreg5 Dec 2, 2025
1a61112
try 1
oldGreg5 Dec 2, 2025
655f266
try 2
oldGreg5 Dec 3, 2025
e7a9ecb
try 3, with direct commit hash
oldGreg5 Dec 3, 2025
cdcb3e0
try 3, revert
oldGreg5 Dec 3, 2025
98e1e38
try 4, swap jobs
oldGreg5 Dec 3, 2025
747e435
try 5, no swap, add space clean to devnet
oldGreg5 Dec 3, 2025
6c0a8f8
remove ssh agent from test
kukkok3 Dec 3, 2025
f133546
cleanup
oldGreg5 Dec 4, 2025
20cf26f
ssh agent cleanup try 1
oldGreg5 Dec 4, 2025
7457005
pre build images job, try 1
oldGreg5 Dec 4, 2025
36d69c6
pre build images job, try 2
oldGreg5 Dec 4, 2025
bddf261
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 4, 2025
70463dd
pre build images job, try 3
oldGreg5 Dec 4, 2025
7513dcc
pre build images job, try 4
oldGreg5 Dec 4, 2025
4f0ad8b
pre build images job, try 5
oldGreg5 Dec 4, 2025
e0ce3af
pre build images job, try 6
oldGreg5 Dec 4, 2025
f161a00
pre build images job, try 7
oldGreg5 Dec 4, 2025
a9281d9
pre build images job, try 7
oldGreg5 Dec 4, 2025
894d787
pre build images job, try 8
oldGreg5 Dec 4, 2025
d28ae71
pre build images job, try 9
oldGreg5 Dec 4, 2025
66d1bd5
pre build images job, try 9
oldGreg5 Dec 4, 2025
eb43ea6
pre build images job, try 10
oldGreg5 Dec 4, 2025
4c634f0
revert workflows borrowing
oldGreg5 Dec 4, 2025
815f5c4
try 1
oldGreg5 Dec 4, 2025
4b9a891
try 2
oldGreg5 Dec 4, 2025
afce30a
try 3
oldGreg5 Dec 4, 2025
bd581f4
cleanup
oldGreg5 Dec 4, 2025
f60abb8
cleanup 2
oldGreg5 Dec 4, 2025
492c467
cleanup 3
oldGreg5 Dec 4, 2025
2548cc4
adding devnet starting retry
oldGreg5 Dec 4, 2025
e8cfd7c
adding devnet starting retry, try 2
oldGreg5 Dec 4, 2025
79128ac
check if devnet retry works
oldGreg5 Dec 4, 2025
8993151
check if devnet retry works, try 2
oldGreg5 Dec 4, 2025
c5aca85
check if devnet retry works, try 3
oldGreg5 Dec 4, 2025
35e07d9
check if devnet retry works, try 4
oldGreg5 Dec 4, 2025
2c10efe
check if devnet retry works, try 5
oldGreg5 Dec 5, 2025
99de776
check if devnet retry works, try 6
oldGreg5 Dec 5, 2025
9a92ed3
check if devnet retry works, try 7
oldGreg5 Dec 5, 2025
4369f23
use nightly to experiment
oldGreg5 Dec 5, 2025
078b9f8
use nightly to experiment, try 2
oldGreg5 Dec 5, 2025
7896fb5
use nightly to experiment, try 3
oldGreg5 Dec 5, 2025
2d3a152
use nightly to experiment, try 4
oldGreg5 Dec 5, 2025
037a332
use nightly to experiment, try 5
oldGreg5 Dec 5, 2025
7e2dcf9
use nightly to experiment, try 6
oldGreg5 Dec 5, 2025
872b480
make building schemathesis in tests only
oldGreg5 Dec 5, 2025
132457b
Merge branch 'main' into feat/runs-schemathesis-on-devnet
oldGreg5 Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ vsync
wallclock
wasmtime
Wconditional
webfactory
webos
Werror
Wireframes
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
needs: [ci, paths-filter]
if: ${{ needs.paths-filter.outputs.catalyst-gateway == 'true' || github.base_ref == 'main'}}
uses: ./.github/workflows/gateway-tests.yml
secrets:
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }}

voices-integration-tests:
needs: [ci, paths-filter]
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/gateway-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Catalyst Gateway integration tests

on:
workflow_call:
secrets:
PRIVATE_SSH_KEY:
required: true

concurrency:
group: gateway-tests-${{ github.head_ref || github.ref }}
Expand Down Expand Up @@ -33,11 +36,17 @@ jobs:
docker-images: false
swap-storage: true

- name: Setup SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }}

- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@ci/v1.10.0
with:
enable_caching: "true"
version: 0.21.0

- name: Setup
uses: input-output-hk/catalyst-forge/actions/setup@ci/v1.10.0

Expand Down Expand Up @@ -123,3 +132,101 @@ jobs:
path: "**/*${{ env.COVERAGE_EXT }}"
if-no-files-found: error
retention-days: 1

devnet-tests:
name: Cat-Gateway devnet integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: true

- name: Setup SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }}

- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@ci/v1.10.0
with:
enable_caching: "true"
version: 0.21.0

- name: Setup
uses: input-output-hk/catalyst-forge/actions/setup@ci/v1.10.0

- name: Prepare artifacts
id : images
uses: input-output-hk/catalyst-forge/actions/run@ci/v1.10.0
with:
command: run
args: ./catalyst-gateway/tests/+all-images

- name: Spin up devnet
if: ${{ steps.images.conclusion == 'success' }}
run: |
docker compose -f catalyst-gateway/tests/docker-compose-devnet.yml up cat-devnet -d

- name: Wait for cat-devnet to become healthy
run: |
echo "Waiting for container to be healthy..."
for i in {1..500}; do
STATUS=$(docker inspect --format='{{.State.Health.Status}}' cat-devnet)
echo "Health status: $STATUS"
if [ "$STATUS" == "healthy" ]; then
echo "Container is healthy!"
break
fi
if [ "$STATUS" == "unhealthy" ]; then
echo "Container became unhealthy."
exit 1
fi
sleep 5
done

- name: Spin up catalyst-gateway
id: gateway-started
run: |
docker compose -f catalyst-gateway/tests/docker-compose-devnet.yml up cat-gateway -d

- name: Wait for cat-gateway to become healthy
id: gateway-healthy
if: ${{ steps.gateway-started.conclusion == 'success' }}
run: |
echo "Waiting for container to be healthy..."
for i in {1..500}; do
STATUS=$(docker inspect --format='{{.State.Health.Status}}' cat-gateway)
echo "Health status: $STATUS"
if [ "$STATUS" == "healthy" ]; then
echo "Container is healthy!"
break
fi
if [ "$STATUS" == "unhealthy" ]; then
echo "Container became unhealthy."
break
fi
sleep 5
done

if [ "$STATUS" != "healthy" ]; then
docker compose -f catalyst-gateway/tests/docker-compose-devnet.yml logs cat-gateway
exit 1
fi

- name: Schemathesis tests
if: ${{ steps.gateway-healthy.conclusion == 'success' }}
run: |
docker compose -f catalyst-gateway/tests/docker-compose-devnet.yml up schemathesis-runner --exit-code-from schemathesis-runner
2 changes: 2 additions & 0 deletions catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.6.3 AS spectral-ci
IMPORT .. AS gateway
IMPORT github.com/input-output-hk/catalyst-qa/catalyst-devnet:devnet/v0.0.3 AS devnet

# build all necessary docker images required to run `docker-compose.yml` services
all-images:
Expand All @@ -14,6 +15,7 @@ all-images:
BUILD +package-rust-tests-runner
BUILD +package-event-db-v1
BUILD +package-haproxy
BUILD devnet+docker

# a special package for applying migrations only up to "V2_**" migrations
package-event-db-v1:
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/tests/api_tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package:
ENV DEP_MK_SIGNED_DOC_PATH="./dep_mk_signed_doc"

# Install socat
RUN apt-get update \
RUN apt-get clean && apt-get autoremove && apt-get update \
&& apt-get install -y --no-install-recommends socat \
&& rm -rf /var/lib/apt/lists/*

Expand Down
117 changes: 117 additions & 0 deletions catalyst-gateway/tests/docker-compose-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# cspell: words statusgossip socat

services:

cat-devnet:
image: cat-devnet:latest
container_name: cat-devnet
healthcheck:
#TODO when the issues with block initial sizes is fixed, update the healthcheck https://github.com/input-output-hk/catalyst-voices/issues/3327
test: ["CMD-SHELL","bash /healthcheck.sh"]
start_period: 60s
interval: 30s
retries: 20
volumes:
- data:/shared-data
network_mode: host

event-db:
image: event-db:latest
container_name: event-db
environment:
- DB_HOST=localhost
- DB_PORT=5432
- DB_NAME=CatalystEventDev
- DB_DESCRIPTION="Catalyst Event DB"
- DB_SUPERUSER=postgres
- DB_SUPERUSER_PASSWORD=postgres
- DB_USER=catalyst-event-dev
- DB_USER_PASSWORD=CHANGE_ME
- INIT_AND_DROP_DB=true
- WITH_MIGRATIONS=true
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_PASSWORD}",
]
interval: 10s
timeout: 5s
retries: 10
network_mode: host

scylla-node:
image: scylladb/scylla:latest
container_name: scylla-node
restart: unless-stopped
command: --smp 2 --memory 1G --overprovisioned 1 --rpc-address 0.0.0.0 --broadcast-rpc-address 127.0.0.1 --api-address 0.0.0.0 --alternator-address 0.0.0.0
healthcheck:
test: cqlsh -e "SHOW VERSION" || exit 1
interval: 15s
timeout: 30s
retries: 10
network_mode: host

cat-gateway:
image: cat-gateway:latest
container_name: cat-gateway
healthcheck:
test: "curl -s -i localhost:3030/api/v1/health/started | head -n 1 | grep 204"
start_period: 30s
interval: 30s
timeout: 30s
# approximately a 25 minutes of waiting
retries: 50
environment:
- EVENT_DB_URL=postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev
- CASSANDRA_PERSISTENT_URL=localhost:9042
- CASSANDRA_VOLATILE_URL=localhost:9042
- CHAIN_NETWORK=Devnet
- SIGNED_DOC_SK=0x6455585b5dcc565c8975bc136e215d6d4dd96540620f37783c564da3cb3686dd
- INTERNAL_API_KEY=123
# - LOG_LEVEL=error
# - RUST_LOG="error,cat_gateway=debug,cardano_chain_follower=debug,mithril-client=debug"
depends_on:
event-db:
condition: service_healthy
scylla-node:
condition: service_healthy
cat-devnet:
condition: service_healthy
network_mode: host

devnet-tests:
image: devnet-tests:latest
container_name: devnet-tests
environment:
- CARDANO_NODE_SOCKET_PATH=/shared-data/artifacts/devnet/node-pool1/ipc/node.sock
- CARDANO_CLI_BIN=/shared-data/artifacts/devnet/bin/cardano-cli
- GENESIS_WALLET_ADDR=/shared-data/artifacts/devnet/addresses/utxo1.addr
- GENESIS_WALLET_SKEY=/shared-data/artifacts/devnet/addresses/utxo1.skey
- NETWORK_MAGIC=42
- CARDANO_API_URL=localhost:8090
- GATEWAY_API_URL=localhost:3030
volumes:
- data:/shared-data
depends_on:
cat-gateway:
condition: service_healthy
network_mode: host

schemathesis-runner:
image: schemathesis-runner:latest
container_name: schemathesis-runner
environment:
- API_SPEC=${API_SPEC:-http://localhost:3030/docs/cat-gateway.json}
- WAIT_FOR_SCHEMA=${WAIT_FOR_SCHEMA:-500}
- MAX_RESPONSE_TIME=${MAX_RESPONSE_TIME:-5000}
- HYPOTHESIS_MAX_EXAMPLES=${HYPOTHESIS_MAX_EXAMPLES:-100}
# place a seed value to reproduce some specific schemathesis test scenario
# - SEED=""
depends_on:
cat-gateway:
condition: service_healthy
network_mode: host

volumes:
data:
9 changes: 3 additions & 6 deletions catalyst-gateway/tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ services:
- DB_SUPERUSER_PASSWORD=postgres
- DB_USER=catalyst-event-dev
- DB_USER_PASSWORD=CHANGE_ME

- INIT_AND_DROP_DB=true
- WITH_MIGRATIONS=false
ports:
- 5432:5432
- "5432:5432"
healthcheck:
test:
[
Expand All @@ -41,7 +40,6 @@ services:
- DB_SUPERUSER_PASSWORD=postgres
- DB_USER=catalyst-event-dev
- DB_USER_PASSWORD=CHANGE_ME

- INIT_AND_DROP_DB=false
- WITH_SEED_DATA=.
- WITH_MIGRATIONS=true
Expand All @@ -62,7 +60,6 @@ services:
- DB_SUPERUSER_PASSWORD=postgres
- DB_USER=catalyst-event-dev
- DB_USER_PASSWORD=CHANGE_ME

- INIT_AND_DROP_DB=false
- WITH_SEED_DATA=.
- WITH_MIGRATIONS=true
Expand All @@ -77,7 +74,7 @@ services:
restart: unless-stopped
command: --smp 2 --memory 1G --overprovisioned 1 --api-address 0.0.0.0
ports:
- 9042:9042
- "9042:9042"
healthcheck:
test: cqlsh -e "SHOW VERSION" || exit 1
interval: 15s
Expand Down Expand Up @@ -109,7 +106,7 @@ services:
# - LOG_LEVEL=error
# - RUST_LOG="error,cat_gateway=debug,cardano_chain_follower=debug,mithril-client=debug"
ports:
- 3030:3030
- "3030:3030"
depends_on:
event-db-migrations:
condition: service_started
Expand Down
Loading