Skip to content
Merged
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
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,62 @@ jobs:

- name: Run fourmolu
run: ./scripts/fourmolize.sh

test-with-stack:
name: Stack
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
resolver: [lts-22, lts-23, lts-24, nightly]
include:
- resolver: lts-22
ghc: "9.6.7"
- resolver: lts-23
ghc: "9.8.4"
- resolver: lts-24
ghc: "9.10.2"
- resolver: nightly
ghc: "9.12.2"
env:
STACK_ARGS: '--resolver ${{ matrix.resolver }} --system-ghc'
cache-version: v0 # bump up this version to invalidate currently stored cache
steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'
cabal-version: 'latest'
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell-cabal.outputs.stack-root }}
.stack-work
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ env.cache-version }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}-${{ env.cache-version }}
- name: Build
run: |
set -ex
stack $STACK_ARGS test --no-run-tests --haddock --no-haddock-deps
- name: Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
set -ex
if [ "${{ matrix.os }}.${{ matrix.resolver }}" == "ubuntu-latest.lts-22" ] && [ -n "${COVERALLS_REPO_TOKEN}" ]; then
stack $STACK_ARGS test --coverage
stack $STACK_ARGS hpc report --all
curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.7.0/shc-Linux-X64.tar.bz2 | tar xj shc
./shc --repo-token="$COVERALLS_REPO_TOKEN" --partial-coverage --fetch-coverage combined custom
else
stack $STACK_ARGS test
fi
56 changes: 28 additions & 28 deletions cuddle.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,29 @@ library
Codec.CBOR.Cuddle.Pretty.Utils

build-depends:
base >=4.18 && <4.22,
base16-bytestring ^>=1.0.2,
boxes ^>=0.1.5,
bytestring >=0.11.4 && <0.13,
capability ^>=0.5,
cborg ^>=0.2.10,
containers >=0.6.7 && <0.8,
data-default-class ^>=0.2,
foldable1-classes-compat ^>=0.1.1,
generic-optics ^>=2.2.1,
hashable ^>=1.5,
megaparsec ^>=9.7,
mtl ^>=2.3.1,
mutable-containers ^>=0.3.4,
optics-core ^>=0.4.1,
ordered-containers ^>=0.2.4,
parser-combinators ^>=1.3,
prettyprinter ^>=1.7.1,
base >=4.18 && <5,
base16-bytestring >=1.0.2,
boxes >=0.1.5,
bytestring >=0.11.4,
capability >=0.5,
cborg >=0.2.10,
containers >=0.6.7,
data-default-class >=0.2,
foldable1-classes-compat >=0.1.1,
generic-optics >=2.2.1,
hashable >=1.4,
megaparsec >=9.5,
mtl >=2.3.1,
mutable-containers >=0.3.4,
optics-core >=0.4.1,
ordered-containers >=0.2.4,
parser-combinators >=1.3,
prettyprinter >=1.7.1,
random >=1.2,
regex-tdfa ^>=1.3.2,
scientific ^>=0.3.8,
text >=2.0.2 && <2.2,
tree-diff ^>=0.3.4,
regex-tdfa >=1.3.2,
scientific >=0.3.7,
text >=2.0.2,
tree-diff >=0.3,

hs-source-dirs: src
default-language: GHC2021
Expand Down Expand Up @@ -126,7 +126,7 @@ executable cuddle
cuddle,
megaparsec,
mtl,
optparse-applicative ^>=0.19,
optparse-applicative >=0.18,
prettyprinter,
random,
text,
Expand All @@ -145,16 +145,16 @@ test-suite cuddle-test
hs-source-dirs: test
main-is: Main.hs
build-depends:
HUnit ^>=1.6.2,
QuickCheck ^>=2.15,
HUnit >=1.6.2,
QuickCheck >=2.14,
base,
bytestring,
cuddle,
data-default-class,
hspec ^>=2.11,
hspec-megaparsec ^>=2.2,
hspec >=2.11,
hspec-megaparsec >=2.2,
megaparsec,
prettyprinter,
string-qq ^>=0.0.6,
string-qq >=0.0.6,
text,
tree-diff,
8 changes: 8 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
snapshot: lts-22.44
system-ghc: true
packages:
- .
extra-deps:
- capability-0.5.0.1@sha256:3b3fa095891573bbdff854bf8351c3fcfa986d502c8071a2e4a2686ff3819302,3287
- data-default-class-0.2.0.0@sha256:788dc5c0be3981ca83ad11206e300a77ae8a1c8b9bc4f9630f563d37f540ccbd,728
- data-default-0.8.0.1@sha256:536ff91641a39b8ad302eebceff767d86ec6b543b44b1db9104650a2b1bc63bd,1110