Skip to content

Commit

Permalink
Fix check-tutorial workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Aug 15, 2024
1 parent 1fcdf1d commit 3491d9c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/check-tutorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ jobs:
import re
with open("docs/docs/tutorial/index.md", "r") as tutorial:
body = tutorial.read()
usedCardanoNodeVersions = re.findall(r"cardano-node-([0-9]+\.[0-9]+\.[0-9]+)-.*\.tar\.gz", body)
usedCardanoNodeVersions = re.findall(r"cardano_node_version=([0-9]+\.[0-9]+\.[0-9]+)", body)
with open("hydra-cluster/test/Test/CardanoNodeSpec.hs", "r") as cardanoNodeSpecFile:
body = cardanoNodeSpecFile.read()
expectedCardanoNodeVersion = re.findall(r"supportedCardanoNodeVersion.*([0-9]+\.[0-9]+\.[0-9]+)", body)[0]
print("Checking used cardano-node version")
print(usedCardanoNodeVersions)
print(expectedCardanoNodeVersion)
if all(v == expectedCardanoNodeVersion for v in usedCardanoNodeVersions):
print("Checking used cardano-node versions")
if len(usedCardanoNodeVersions) > 0 and all(v == expectedCardanoNodeVersion for v in usedCardanoNodeVersions):
print(" PASS ✓")
else:
print(" FAIL ❌")
Expand All @@ -65,9 +63,7 @@ jobs:
knownMithrilEndpoints = re.findall(r"Aggregator endpoint.*\((http[^\)]*)", preprodSection)
print("Checking mithril aggregator endpoints")
print(usedMithrilEndpoints)
print(knownMithrilEndpoints)
if all(v in set(knownMithrilEndpoints) for v in usedMithrilEndpoints):
if len(usedMithrilEndpionts) > 0 and all(v in set(knownMithrilEndpoints) for v in usedMithrilEndpoints):
print(" PASS ✓")
else:
print(" FAIL ❌")
Expand Down

0 comments on commit 3491d9c

Please sign in to comment.