Skip to content

Commit 7e13bdb

Browse files
committed
Add continuous integration to Github workflow
1 parent 7036888 commit 7e13bdb

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

.github/workflows/main.yml

Lines changed: 22 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,24 @@ 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+
needs: build
43+
runs-on: ${{ matrix.os }}
44+
strategy:
45+
matrix:
46+
os: [ ubuntu-latest]
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
- name: Set up Python ${{ matrix.python-version }}
51+
uses: actions/setup-python@v2
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
- name: Python Poetry Action
55+
uses: abatilo/actions-poetry@v2.1.3
56+
57+
- name: Run integration tests
58+
run: |
59+
cd integration-test && ./run_tests.sh

integration-test/run_tests.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
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
18+
docker-compose logs ogmios
19+
docker-compose logs cardano-node
1020

1121
export PAYMENT_KEY="$ROOT"/configs/local-alonzo/shelley/utxo-keys/utxo1.skey
1222
poetry run pytest -s "$ROOT"/test
1323

24+
# Cleanup
25+
docker-compose logs ogmios
26+
docker-compose logs cardano-node
1427
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)