From 4bc977a58f64bc37d295f5e874d35447492e9d3c Mon Sep 17 00:00:00 2001 From: Andre Videla Date: Fri, 29 Dec 2023 00:22:06 +0000 Subject: [PATCH] add act on CI --- .github/workflows/main.yml | 17 +++++++++++++++++ act/tests/Spec.hs | 2 +- evm/src/EVM/TH.hs | 2 +- evm/src/Examples/Prisoner.hs | 1 - 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b32096..621a439 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,23 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + runact: + name: run act tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: haskell/actions/setup@v1 + with: + ghc-version: '9.2.6' # Exact version of ghc to use + # cabal-version: 'latest'. Omitted, but defaults to 'latest' + enable-stack: true + stack-version: 'latest' + - run: | + cd act + stack test runevm: name: run hevm tests runs-on: ubuntu-latest diff --git a/act/tests/Spec.hs b/act/tests/Spec.hs index bddd9dd..950b260 100644 --- a/act/tests/Spec.hs +++ b/act/tests/Spec.hs @@ -1,8 +1,8 @@ import Data.ByteString.Lazy.Char8 (pack) import Examples.Player +import OpenGames.Engine.Diagnostics (generateOutputStr) import Test.Tasty import Test.Tasty.Golden -import OpenGames.Engine.Diagnostics (generateOutputStr) main :: IO () main = diff --git a/evm/src/EVM/TH.hs b/evm/src/EVM/TH.hs index e8b7e8d..56e59d3 100644 --- a/evm/src/EVM/TH.hs +++ b/evm/src/EVM/TH.hs @@ -267,7 +267,7 @@ setupAddresses amounts = updateContractMap [] x = x updateContractMap ((addr, amount) : cs) map = let map' = adjustOrAdd (set #balance amount) (set #balance amount emptyContract) addr map - in updateContractMap cs map' + in updateContractMap cs map' createNew (addr, amount) = (addr, set #balance amount emptyContract) diff --git a/evm/src/Examples/Prisoner.hs b/evm/src/Examples/Prisoner.hs index de9f9ce..dc3affb 100644 --- a/evm/src/Examples/Prisoner.hs +++ b/evm/src/Examples/Prisoner.hs @@ -101,4 +101,3 @@ outcomeAutomatic = do let out4 = generateOutputStr (evaluated1 :- evaluated2 :- Nil) pure (out1 ++ out2 ++ out3 ++ out4) -