Skip to content

Commit 5d306f9

Browse files
committed
Add continuous integration to Github workflow
1 parent 7036888 commit 5d306f9

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: ["main"]
66
pull_request:
77
branches: ["main"]
8-
types: [opened, reopened, synchronize]
8+
types: [opened, reopened, edited, synchronize]
99

1010
jobs:
1111
build:
@@ -36,4 +36,23 @@ jobs:
3636
- name: "Upload coverage to Codecov"
3737
uses: codecov/codecov-action@v2
3838
with:
39-
fail_ci_if_error: true
39+
fail_ci_if_error: true
40+
41+
continuous-integration:
42+
runs-on: ${{ matrix.os }}
43+
strategy:
44+
matrix:
45+
os: [ ubuntu-latest]
46+
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
- name: Python Poetry Action
54+
uses: abatilo/[email protected]
55+
56+
- name: Run integration tests
57+
run: |
58+
cd integration-test && ./run_tests.sh

integration-test/run_node.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
if [ "$NETWORK" = "local-alonzo" ]
44
then
5+
chmod 400 /code/tmp_configs/"$NETWORK"/shelley/*.skey
6+
chmod 400 /code/tmp_configs/"$NETWORK"/shelley/*.vkey
57
cardano-node run \
68
--config /code/tmp_configs/"$NETWORK"/config.json \
79
--topology /code/tmp_configs/"$NETWORK"/topology.json \

integration-test/run_tests.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
#!/bin/sh
1+
#!/bin/bash
2+
3+
set -e
4+
set -o pipefail
25

36
ROOT=$(pwd)
47

58
poetry install
69

710
# Run alonzo integration tests
811
./bootstrap.sh local-alonzo
12+
13+
# Cleanup containers and volumes in case there is any running
14+
docker-compose down --volume
15+
16+
# Launch containers
917
docker-compose up -d
1018

1119
export PAYMENT_KEY="$ROOT"/configs/local-alonzo/shelley/utxo-keys/utxo1.skey
1220
poetry run pytest -s "$ROOT"/test
1321

22+
# Cleanup
1423
docker-compose down --volume

integration-test/test/test_mint_nft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestMintNFT:
1919

2020
chain_context = OgmiosChainContext(OGMIOS_WS, Network.TESTNET)
2121

22-
@retry(tries=5, delay=2)
22+
@retry(tries=10, delay=6)
2323
def check_ogmios(self):
2424
print(f"Current chain tip: {self.chain_context.last_block_slot}")
2525

0 commit comments

Comments
 (0)