Skip to content

Commit

Permalink
Merge pull request #42 from blockfrost/ci/update
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
sorki authored Nov 8, 2023
2 parents 1a6e4c2 + 70e58a7 commit 129c658
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v1"
- uses: "actions/checkout@v3"
- id: setup-haskell-cabal
uses: "haskell/actions/setup@v1.2"
uses: "haskell-actions/setup@v2"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
Expand All @@ -17,8 +17,8 @@ jobs:
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: cabal freeze
- uses: "actions/cache@v2"
run: cabal freeze --enable-tests --enable-benchmarks
- uses: "actions/cache@v3"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: |
Expand All @@ -35,10 +35,11 @@ jobs:
strategy:
matrix:
cabal:
- '3.4'
- '3.10'
ghc:
- '8.10.5'
- '9.0.1'
- '9.4.7'
- '9.0.2'
- '8.10.7'
name: Haskell CI
on:
- push
Expand Down
4 changes: 3 additions & 1 deletion blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ data Amount =

-- | SomeDiscrete values always use scale of 1
unitScale :: Money.Scale
unitScale = let (Just s) = Money.scaleFromRational 1 in s
unitScale = case Money.scaleFromRational 1 of
Just s -> s
Nothing -> error "Money.scaleFromRational impossible"

instance ToJSON Money.SomeDiscrete where
toJSON sd =
Expand Down
7 changes: 4 additions & 3 deletions ci.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ in haskellCi.generalCi
haskellCi.matrixSteps
( Some
{ ghc =
[ haskellCi.GHC.GHC8105
, haskellCi.GHC.GHC901
[ haskellCi.GHC.GHC947
, haskellCi.GHC.GHC902
, haskellCi.GHC.GHC8107
]
, cabal = [ haskellCi.Cabal.Cabal34 ]
, cabal = [ haskellCi.Cabal.Cabal310 ]
}
)
: haskellCi.CI.Type

0 comments on commit 129c658

Please sign in to comment.