Skip to content

💫💫💫 Rerun testnet tests 20x #5695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
# see https://github.com/haskell/stm/issues/76
ghc: ["9.6", "9.10"]
cabal: ["3.12"]
n: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
sys:
- { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
- { os: ubuntu-latest, shell: bash }
Expand All @@ -62,17 +63,6 @@ jobs:
MSYS2_PATH_TYPE: inherit
MSYSTEM: MINGW64

concurrency:
group: >
a+${{ github.event_name }}
b+${{ github.workflow_ref }}
c+${{ github.job }}
d+${{ matrix.ghc }}
e+${{ matrix.cabal }}
f+${{ matrix.sys.os }}
g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }}
cancel-in-progress: true

steps:
- name: Concurrency group
run: >
Expand Down Expand Up @@ -180,7 +170,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: failed-test-workspaces-${{ matrix.sys.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz
name: failed-test-workspaces-${{ matrix.sys.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}-${{ matrix.n }}.tgz
path: ${{ runner.temp }}/workspaces.tgz

- name: "Tar artifacts"
Expand Down
2 changes: 1 addition & 1 deletion cardano-testnet/src/Testnet/Property/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Hedgehog.Internal.Property (MonadTest)


disableRetries :: Bool
disableRetries = IO.unsafePerformIO $ do
disableRetries = const True . IO.unsafePerformIO $ do
mValue <- IO.lookupEnv "DISABLE_RETRIES"
return $ mValue == Just "1"
{-# NOINLINE disableRetries #-}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
-- If we don't wait, the leadership-schedule test will say SPO has no stake
_ <- waitForEpochs epochStateView (EpochInterval 1)

forallQueryCommands $ \case
let filterQ :: Applicative m => (TestQueryCmds -> m ()) -> TestQueryCmds -> m ()
filterQ f = \case
TestQueryStakeAddressInfoCmd -> f TestQueryStakeAddressInfoCmd
_ -> pure ()

forallQueryCommands . filterQ $ \case

TestQueryLeadershipScheduleCmd ->
-- leadership-schedule
Expand Down Expand Up @@ -262,7 +267,7 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
fileQueryHash === keyQueryHash
fileQueryAmount === keyQueryAmount

TestQueryStakeAddressInfoCmd -> pure ()
TestQueryStakeAddressInfoCmd ->
-- stake-address-info
{-
FIXME: this test is flaky - needs investigation : the reward account balance is changing between multiple executions e.g.
Expand All @@ -275,6 +280,7 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
│ < "rewardAccountBalance": 0,
│ ---
│ > "rewardAccountBalance": 5257141033,
-}
do
-- to stdout
let delegatorKeys = Defaults.defaultDelegatorStakeKeyPair 1
Expand All @@ -298,7 +304,6 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
H.diffFileVsGoldenFile
redactedStakeAddressInfoOutFile
"test/cardano-testnet-test/files/golden/queries/stakeAddressInfoOut.json"
-}
TestQueryUTxOCmd ->
-- utxo
H.noteM_ $ execCli' execConfig [ eraName, "query", "utxo", "--whole-utxo" ]
Expand Down Expand Up @@ -480,8 +485,8 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.
readVerificationKeyFromFile asKey work =
H.evalEitherM . liftIO . runExceptT . readVerificationKeyOrFile asKey . VerificationKeyFilePath . File . (work </>) . unFile

_verificationStakeKeyToStakeAddress :: Int -> VerificationKey StakeKey -> StakeAddress
_verificationStakeKeyToStakeAddress testnetMagic delegatorVKey =
verificationStakeKeyToStakeAddress :: Int -> VerificationKey StakeKey -> StakeAddress
verificationStakeKeyToStakeAddress testnetMagic delegatorVKey =
makeStakeAddress (fromNetworkMagic $ NetworkMagic $ fromIntegral testnetMagic) (StakeCredentialByKey $ verificationKeyHash delegatorVKey)

getTxIx :: forall m era. HasCallStack => MonadTest m => ShelleyBasedEra era -> String -> Coin -> (AnyNewEpochState, SlotNo, BlockNo) -> m (Maybe Int)
Expand Down
Loading