Skip to content

Commit 0d12185

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4e61ddb + 235e34f commit 0d12185

File tree

18 files changed

+478
-12
lines changed

18 files changed

+478
-12
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.github/workflows/haskell.yml
2+
.github/workflows/release-ghcr.yaml
3+
.github/workflows/release-upload.yaml
4+
.github/workflows/stylish-haskell.yml

.github/workflows/actionlint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Actionlint
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
actionlint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
# We want to install Nix to provision shellcheck, so that actionlint doesn't install
13+
# its own shellcheck. This will also make sure that this pipeline runs using
14+
# the same shellcheck as the ones in Nix shells of developers.
15+
- name: Install Nix with good defaults
16+
uses: input-output-hk/install-nix-action@v20
17+
with:
18+
extra_nix_config: |
19+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
20+
substituters = https://cache.nixos.org/ https://cache.iog.io/
21+
nix_path: nixpkgs=channel:nixos-unstable
22+
- uses: cachix/install-nix-action@v18
23+
with:
24+
nix_path: nixpkgs=channel:nixos-unstable
25+
# Make the Nix environment available to next steps
26+
- uses: rrbutani/use-nix-shell-action@v1
27+
28+
- name: actionlint
29+
run: |
30+
for file in $(git ls-files ".github/workflows/*.y*ml")
31+
do
32+
if grep -q "$file" ".github/workflows/actionlint-exceptions.txt"
33+
then
34+
echo "⚠️ $file is ignored from actionlint's verifications. Please consider fixing it."
35+
else
36+
echo "actionlint $file"
37+
actionlint "$file"
38+
fi
39+
done

.github/workflows/github-page.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
tar -czf haddocks.tgz -C haddocks .
5151
5252
- name: Upload haddocks artifact
53-
uses: actions/upload-artifact@v2
53+
uses: actions/upload-artifact@v4
5454
if: ${{ always() }}
5555
continue-on-error: true
5656
with:
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.github/bin/haddocks.sh
2+
scripts/ci/check-cabal-files.sh
3+
bench/process/process.sh
4+
bench/script/probe.sh
5+
cardano-submit-api/test/run.sh
6+
cardano-tracer/demo/multi/run.sh
7+
cardano-tracer/demo/ssh/run.sh
8+
ci/check-dependencies-merged-to-master.sh
9+
ci/check-hydra.sh
10+
configuration/cardano/update-config-files.sh
11+
nix/regenerate.sh
12+
nix/workbench/analyse/analyse.sh
13+
nix/workbench/backend/backend.sh
14+
nix/workbench/backend/nomad.sh
15+
nix/workbench/backend/nomad/cloud.sh
16+
nix/workbench/backend/nomad/exec.sh
17+
nix/workbench/backend/nomad/podman.sh
18+
nix/workbench/backend/supervisor.sh
19+
nix/workbench/chaindb.sh
20+
nix/workbench/env.sh
21+
nix/workbench/lib-cabal.sh
22+
nix/workbench/lib.sh
23+
nix/workbench/manifest.sh
24+
nix/workbench/nomad.sh
25+
nix/workbench/profile/pparams/apiPparamsImport.sh
26+
nix/workbench/profile/pparams/diffLatest.sh
27+
nix/workbench/profile/pparams/diffLatestWithOverlay.sh
28+
nix/workbench/profile/pparams/pparamsLastWithOverlay.sh
29+
nix/workbench/profile/profile.sh
30+
nix/workbench/publish.sh
31+
nix/workbench/run.sh
32+
nix/workbench/scenario.sh
33+
nix/workbench/topology/topology.sh
34+
scripts/babbage/example-babbage-script-usage.sh
35+
scripts/babbage/mkfiles.sh
36+
scripts/babbage/script-context-equivalance-test.sh
37+
scripts/babbage/script-mint-context-equivalance-test.sh
38+
scripts/babbage/staking-example/claim-script-staking-rewards.sh
39+
scripts/babbage/staking-example/register-and-delegate-script-staking-address.sh
40+
scripts/bin-path.sh
41+
scripts/byron-to-alonzo/burn.sh
42+
scripts/byron-to-alonzo/mint.sh
43+
scripts/byron-to-alonzo/mkfiles.sh
44+
scripts/byron-to-alonzo/update-3.sh
45+
scripts/byron-to-alonzo/update-4.sh
46+
scripts/byron-to-alonzo/update-5.sh
47+
scripts/ci/check-cabal-files.sh
48+
scripts/gen-merge-summary.sh
49+
scripts/lite/example-build-cmd.sh
50+
scripts/lite/shelley-testnet-2.sh
51+
scripts/lite/shelley-testnet.sh
52+
scripts/lite/shutdown-ipc-example.sh
53+
scripts/lite/split-txouts.sh
54+
scripts/plutus/always-fails.sh
55+
scripts/plutus/example-txin-locking-plutus-script.sh
56+
scripts/plutus/script-context-equivalance-test.sh
57+
scripts/plutus/script-context-equivalence-test-minting.sh
58+
scripts/plutus/simple-minting-policy.sh
59+
scripts/plutus/staking-example/claim-script-staking-rewards.sh
60+
scripts/test-stake-cred-script/create-collateral.sh

.github/workflows/shellcheck.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Shellcheck
2+
# This pipeline runs shellcheck on all files with extension .sh,
3+
# except the ones listed in .github/workflows/shellcheck-exceptions.txt.
4+
#
5+
# This pipeline uses Nix, so that the shellcheck version used is the same
6+
# ones as used by developers in Nix shells. This ensures the CI's behavior
7+
# is consistent with the one of developers.
8+
9+
on:
10+
pull_request:
11+
12+
jobs:
13+
shellcheck:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install Nix with good defaults
18+
uses: input-output-hk/install-nix-action@v20
19+
with:
20+
extra_nix_config: |
21+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
22+
substituters = https://cache.nixos.org/ https://cache.iog.io/
23+
nix_path: nixpkgs=channel:nixos-unstable
24+
- uses: cachix/install-nix-action@v18
25+
with:
26+
nix_path: nixpkgs=channel:nixos-unstable
27+
# Make the Nix environment available to next steps
28+
- uses: rrbutani/use-nix-shell-action@v1
29+
- name: shellcheck
30+
run: |
31+
for file in $(git ls-files "*.sh")
32+
do
33+
if grep -q "$file" ".github/workflows/shellcheck-exceptions.txt"
34+
then
35+
echo "⚠️ $file is ignored from shellcheck's verifications. Please consider fixing it."
36+
else
37+
echo "shellcheck $file"
38+
shellcheck "$file"
39+
fi
40+
done

cardano-testnet/cardano-testnet.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ test-suite cardano-testnet-test
192192
Cardano.Testnet.Test.Gov.DRepDeposit
193193
Cardano.Testnet.Test.Gov.DRepRetirement
194194
Cardano.Testnet.Test.Gov.InfoAction
195+
Cardano.Testnet.Test.Gov.NoConfidence
195196
Cardano.Testnet.Test.Gov.ProposeNewConstitution
196197
Cardano.Testnet.Test.Gov.ProposeNewConstitutionSPO
197198
Cardano.Testnet.Test.Gov.TreasuryGrowth

cardano-testnet/src/Testnet/Defaults.hs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ module Testnet.Defaults
1414
, defaultByronProtocolParamsJsonValue
1515
, defaultYamlConfig
1616
, defaultConwayGenesis
17+
, defaultCommitteeKeyPair
18+
, defaultCommitteeVkeyFp
19+
, defaultCommitteeSkeyFp
20+
, defaultDRepSkeyFp
1721
, defaultDRepKeyPair
1822
, defaultDelegatorStakeKeyPair
19-
, defaultSpoKeys
2023
, defaultSpoColdKeyPair
24+
, defaultSPOColdVKeyFp
25+
, defaultSPOColdSKeyFp
26+
, defaultSpoKeys
2127
, defaultShelleyGenesis
2228
, defaultGenesisFilepath
2329
, defaultYamlHardforkViaConfig
@@ -491,6 +497,16 @@ defaultGenesisFilepath era =
491497
-- This path is actually generated by create-testnet-data. Don't change it.
492498
eraToString era <> "-genesis.json"
493499

500+
defaultCommitteeVkeyFp
501+
:: Int -- ^ The Committee's index (starts at 1)
502+
-> FilePath
503+
defaultCommitteeVkeyFp n = "committee-keys" </> "committee" <> show n <> ".vkey"
504+
505+
defaultCommitteeSkeyFp
506+
:: Int -- ^ The Committee's index (starts at 1)
507+
-> FilePath
508+
defaultCommitteeSkeyFp n = "committee-keys" </> "committee" <> show n <> ".skey"
509+
494510
-- | The relative path to DRep keys in directories created by cardano-testnet
495511
defaultDRepKeyPair
496512
:: Int -- ^ The DRep's index (starts at 1)
@@ -501,6 +517,27 @@ defaultDRepKeyPair n =
501517
, signingKey = File $ "drep-keys" </> ("drep" <> show n) </> "drep.skey"
502518
}
503519

520+
-- | The relative path to DRep secret keys in directories created by cardano-testnet
521+
defaultDRepSkeyFp
522+
:: Int -- ^ The DRep's index (starts at 1)
523+
-> FilePath
524+
defaultDRepSkeyFp n = "drep-keys" </> ("drep" <> show n) </> "drep.skey"
525+
526+
defaultCommitteeKeyPair :: Int -> KeyPair PaymentKey
527+
defaultCommitteeKeyPair n =
528+
KeyPair
529+
{ verificationKey = File $ defaultCommitteeVkeyFp n
530+
, signingKey = File $ defaultCommitteeSkeyFp n
531+
}
532+
533+
-- | The relative path to SPO cold verification key in directories created by cardano-testnet
534+
defaultSPOColdVKeyFp :: Int -> FilePath
535+
defaultSPOColdVKeyFp n = "pools-keys" </> "pool" <> show n </> "cold.vkey"
536+
537+
-- | The relative path to SPO cold secret key in directories created by cardano-testnet
538+
defaultSPOColdSKeyFp :: Int -> FilePath
539+
defaultSPOColdSKeyFp n = "pools-keys" </> "pool" <> show n </> "cold.skey"
540+
504541
-- | The relative path to SPO keys in directories created by cardano-testnet
505542
defaultSpoColdKeyPair
506543
:: Int

cardano-testnet/src/Testnet/Process/Run.hs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module Testnet.Process.Run
1515
, procSubmitApi
1616
, procChairman
1717
, mkExecConfig
18+
, mkExecConfigOffline
1819
, ProcessError(..)
1920
, ExecutableError(..)
2021
) where
@@ -190,6 +191,24 @@ mkExecConfig tempBaseAbsPath sprocket networkId = do
190191
, H.execConfigCwd = Last $ Just tempBaseAbsPath
191192
}
192193

194+
-- | Creates an 'ExecConfig' that can be used to run a process offline.
195+
-- e.g cardano-cli without a node running.
196+
mkExecConfigOffline :: ()
197+
=> MonadTest m
198+
=> MonadIO m
199+
=> FilePath
200+
-> m ExecConfig
201+
mkExecConfigOffline tempBaseAbsPath = do
202+
env' <- H.evalIO IO.getEnvironment
203+
204+
return H.ExecConfig
205+
{ H.execConfigEnv = Last $ Just
206+
-- The environment must be passed onto child process on Windows in order to
207+
-- successfully start that process.
208+
env'
209+
, H.execConfigCwd = Last $ Just tempBaseAbsPath
210+
}
211+
193212

194213
data ProcessError
195214
= ProcessIOException IOException

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepDeposit.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import qualified Hedgehog.Extras as H
3232
hprop_ledger_events_drep_deposits :: Property
3333
hprop_ledger_events_drep_deposits = integrationWorkspace "drep-deposits" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
3434

35-
-- Start a local test net
35+
3636
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3737
let tempAbsPath' = unTmpAbsPath tempAbsPath
3838
tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/InfoAction.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import qualified Hedgehog.Extras as H
4747
hprop_ledger_events_info_action :: Property
4848
hprop_ledger_events_info_action = integrationRetryWorkspace 0 "info-hash" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
4949

50-
-- Start a local test net
50+
5151
conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath'
5252
let tempAbsPath' = unTmpAbsPath tempAbsPath
5353
tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath

0 commit comments

Comments
 (0)