Skip to content

Commit cab6e88

Browse files
authored
Fix integration tests (#94)
* Fix integration test * Run CI on all branches * Upload docker log if integration tests fail * Test
1 parent 6d74b69 commit cab6e88

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: "**"
66
pull_request:
77
branches: ["main"]
88
types: [opened, reopened, edited, synchronize]
@@ -59,3 +59,15 @@ jobs:
5959
- name: Run integration tests
6060
run: |
6161
cd integration-test && ./run_tests.sh
62+
63+
- name: Dump docker logs
64+
if: failure()
65+
run: |
66+
cd integration-test && docker-compose logs --no-color > integration-test.log
67+
68+
- name: Upload integration-test.log
69+
if: failure()
70+
uses: actions/upload-artifact@v2
71+
with:
72+
name: integration-test.log
73+
path: integration-test/integration-test.log

integration-test/run_tests.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ ROOT=$(pwd)
77

88
poetry install
99

10+
##########
11+
# Alonzo #
12+
##########
13+
14+
# Cleanup containers and volumes in case there is any running
15+
docker-compose down --volumes --remove-orphans
16+
17+
# Run alonzo integration tests
18+
./bootstrap.sh local-alonzo
19+
20+
# Launch containers
21+
docker-compose up -d
22+
23+
export PAYMENT_KEY="$ROOT"/configs/local-alonzo/shelley/utxo-keys/utxo1.skey
24+
export EXTENDED_PAYMENT_KEY="$ROOT"/keys/extended.skey
25+
export POOL_ID=$(cat "$ROOT"/keys/pool/pool.id)
26+
27+
# Wait for stake pool to start producing blocks
28+
sleep 20
29+
30+
# Cleanup
31+
docker-compose down --volumes --remove-orphans
32+
1033
#########
1134
# Vasil #
1235
#########
@@ -25,7 +48,7 @@ export EXTENDED_PAYMENT_KEY="$ROOT"/keys/extended.skey
2548
export POOL_ID=$(cat "$ROOT"/keys/pool/pool.id)
2649

2750
# Wait for stake pool to start producing blocks
28-
sleep 60
51+
sleep 120
2952

3053
poetry run pytest -s -vv -n 4 "$ROOT"/test
3154

0 commit comments

Comments
 (0)