Skip to content

Commit

Permalink
feat: build docker image for smart-contracts integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LGLO authored Dec 10, 2024
1 parent c60c8c3 commit 0f1286f
Show file tree
Hide file tree
Showing 18 changed files with 1,075 additions and 23 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/smart-contracts-integrations-tests-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Push smart-contracts-tests-cardano-node-ogmios image to GHCR

on:
workflow_dispatch:
inputs:
tag:
description: "Tag for GHCR image"
required: true
type: string

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true

- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: toolkit/offchain/tests/docker/
file: toolkit/offchain/tests/docker/Dockerfile
push: true
tags:
ghcr.io/partner-chains/smart-contracts-tests-cardano-node-ogmios:${{ inputs.tag }}
ghcr.io/partner-chains/smart-contracts-tests-cardano-node-ogmios:latest
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion toolkit/mainchain-follower/db-sync-follower/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ license = "Apache-2.0"
[dependencies]
sqlx = { version = "0.7.4", default-features = false, features = ["runtime-tokio-rustls", "postgres", "macros", "chrono", "migrate", "bigdecimal"]}
tokio = { workspace = true, features = ["full"]}
testcontainers-modules = { version = "0.1.3", features = ["postgres"] }
futures = { workspace = true }
chrono = "0.4.31"
hex = { workspace = true }
Expand Down Expand Up @@ -39,6 +38,7 @@ partner-chains-plutus-data = { workspace = true }
[dev-dependencies]
tokio-test = "0.4.3"
ctor = "0.2.5"
testcontainers-modules = { version = "0.1.3", features = ["postgres"] }

[features]
default = []
Expand Down
1 change: 0 additions & 1 deletion toolkit/offchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ targets = ["x86_64-unknown-linux-gnu"]
anyhow = { workspace = true }
cardano-serialization-lib = { workspace = true }
cbor_event = { workspace = true }
db-sync-follower = { workspace = true, features = ["candidate-source"] }
partner-chains-plutus-data = { workspace = true }
fraction = { workspace = true }
hex = { workspace = true }
Expand Down
7 changes: 7 additions & 0 deletions toolkit/offchain/tests/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM cardanosolutions/cardano-node-ogmios:v6.9.0_10.1.2

COPY ./config /config
COPY ./busybox /busybox
COPY ./entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
Binary file added toolkit/offchain/tests/docker/busybox
Binary file not shown.
117 changes: 117 additions & 0 deletions toolkit/offchain/tests/docker/config/config.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"AlonzoGenesisFile": "/config/genesis/alonzo.json",
"AlonzoGenesisHash": "1d53293bbcd7682fba139090bad147e87a373b70b1de757db36ca47c2a11905d",
"ByronGenesisFile": "/config/genesis/byron.json",
"ByronGenesisHash": "b75de8dd5d5b8f46aeddd1b1447bfbf7672c03340f1e0958b368e20ecf606c0d",
"ConwayGenesisFile": "/config/genesis/conway.json",
"ConwayGenesisHash": "4cc4d44e6894612a181d45c0eb7695cd92823a30db00aa4fd3b693a2847f9f3a",
"EnableP2P": true,
"ExperimentalHardForksEnabled": true,
"ExperimentalProtocolsEnabled": true,
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 3,
"LastKnownBlockVersion-Minor": 1,
"MinNodeVersion": "8.12.0",
"PeerSharing": true,
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
"NetworkMagic": 42,
"ShelleyGenesisFile": "/config/genesis/shelley.json",
"ShelleyGenesisHash": "aed63d7ec0474a71b1f06badcc08356bbe792ffc599b8fab11fc1d2ce31bb727",
"TargetNumberOfActivePeers": 20,
"TargetNumberOfEstablishedPeers": 50,
"TargetNumberOfKnownPeers": 150,
"TargetNumberOfRootPeers": 60,
"TestAllegraHardForkAtEpoch": 0,
"TestAlonzoHardForkAtEpoch": 0,
"TestMaryHardForkAtEpoch": 0,
"TestShelleyHardForkAtEpoch": 0,
"TestBabbageHardForkAtEpoch": 0,
"TestConwayHardForkAtEpoch": 0,
"TraceAcceptPolicy": true,
"TraceBlockFetchClient": false,
"TraceBlockFetchDecisions": false,
"TraceBlockFetchProtocol": false,
"TraceBlockFetchProtocolSerialised": false,
"TraceBlockFetchServer": false,
"TraceChainDb": true,
"TraceChainSyncBlockServer": false,
"TraceChainSyncClient": false,
"TraceChainSyncHeaderServer": false,
"TraceChainSyncProtocol": false,
"TraceConnectionManager": true,
"TraceDNSResolver": true,
"TraceDNSSubscription": true,
"TraceDiffusionInitialization": true,
"TraceErrorPolicy": true,
"TraceForge": true,
"TraceHandshake": true,
"TraceInboundGovernor": true,
"TraceIpSubscription": true,
"TraceLedgerPeers": true,
"TraceLocalChainSyncProtocol": false,
"TraceLocalConnectionManager": true,
"TraceLocalErrorPolicy": true,
"TraceLocalHandshake": true,
"TraceLocalRootPeers": true,
"TraceLocalTxSubmissionProtocol": false,
"TraceLocalTxSubmissionServer": false,
"TraceMempool": true,
"TraceMux": false,
"TracePeerSelection": true,
"TracePeerSelectionActions": true,
"TracePublicRootPeers": true,
"TraceServer": true,
"TraceTxInbound": false,
"TraceTxOutbound": false,
"TraceTxSubmissionProtocol": false,
"TracingVerbosity": "NormalVerbosity",
"TurnOnLogMetrics": true,
"TurnOnLogging": true,
"defaultBackends": [
"KatipBK"
],
"defaultScribes": [
[
"StdoutSK",
"stdout"
]
],
"hasEKG": 12788,
"hasPrometheus": [
"127.0.0.1",
12798
],
"minSeverity": "Info",
"options": {
"mapBackends": {
"cardano.node.metrics": [
"EKGViewBK"
],
"cardano.node.resources": [
"EKGViewBK"
]
},
"mapSubtrace": {
"cardano.node.metrics": {
"subtrace": "Neutral"
}
}
},
"rotation": {
"rpKeepFilesNum": 10,
"rpLogLimitBytes": 5000000,
"rpMaxAgeHours": 24
},
"setupBackends": [
"KatipBK"
],
"setupScribes": [
{
"scFormat": "ScText",
"scKind": "StdoutSK",
"scName": "stdout",
"scRotation": null
}
]
}
Loading

0 comments on commit 0f1286f

Please sign in to comment.