Skip to content

Commit

Permalink
Merge pull request #19 from input-output-hk/KtorZ/#1/coveralls-stylis…
Browse files Browse the repository at this point in the history
…h-haskell

Add Coveralls & Stylish Haskell to CI
  • Loading branch information
Anviking authored Mar 4, 2019
2 parents fa43f1f + 2a61431 commit fa9d69c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 26 deletions.
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ env:
# Do not choose a language; we provide our own build tools:
language: generic

# Deactivate builds on branches but `master` (CI is still triggered by PRs)
branches:
only:
- master

# Caching so the next build will be fast too:
cache:
directories:
- $HOME/.stack
- $HOME/.ghc

# Ensure necessary system libraries are present:
addons:
Expand All @@ -29,19 +35,29 @@ before_install:
# Download and unpack the stack executable:
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- export LTS=$(cat stack.yaml | grep resolver) # Extract the LTS from the stack.yaml
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

install:
- curl -sSL https://raw.github.com/jaspervdj/stylish-haskell/master/scripts/latest.sh | sh -s $(find . -type f -name "*.hs" ! -path "*.stack-work*") -i
- git diff --exit-code # Exit if Stylish-Haskell yields any diff
- stack --no-terminal setup
- stack --no-terminal build --only-snapshot
- stack --no-terminal build --only-dependencies
- stack --no-terminal build --test --no-run-tests
- stack --no-terminal test
- stack --no-terminal build --test --no-run-tests --coverage
- stack --no-terminal test --coverage
- curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
- curl -sSL https://raw.github.com/ndmitchell/weeder/master/misc/travis.sh | sh -s .
- stack --no-terminal install
- sha256sum $EXECUTABLE | head -c 64 > $EXECUTABLE_CHECKSUM
- ls $EXECUTABLE
- ls $EXECUTABLE_CHECKSUM
# Installing shc for coverage reporting;
# We trick it a bit to use the same LTS as us and leverage already installed LTS
# to speed up the process.
- git clone https://github.com/rubik/stack-hpc-coveralls && cd stack-hpc-coveralls && git checkout 3d8352d5642ab214a7a574bd797880ae39595a44 && echo $LTS > stack.yaml
- stack --no-terminal install
- cd - && shc cardano-wallet unit

deploy:
provider: releases
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
</p>

<p align="center">
<img src="https://img.shields.io/badge/version-2.0.0-ff69b4.svg?style=for-the-badge" />
<!-- We will need to decide on that soon enough <img src="https://img.shields.io/badge/version-x.x.x-ff69b4.svg?style=for-the-badge" /> -->
<a href="https://travis-ci.org/input-output-hk/cardano-wallet"><img src="https://img.shields.io/travis/input-output-hk/cardano-wallet.svg?style=for-the-badge" /></a>
<a href="https://coveralls.io/github/input-output-hk/cardano-wallet"><img src="https://img.shields.io/coveralls/github/input-output-hk/cardano-wallet.svg?style=for-the-badge" /></a>
</p>

<hr/>
Expand Down
23 changes: 0 additions & 23 deletions cardano-wallet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@ library
build-depends:
base

-- Hackage Dependencies
, aeson
, aeson-pretty
, base16-bytestring
, base58-bytestring
, bytestring
, cborg
, containers
, cryptonite
, deepseq
, digest
, generic-lens
, http-client
, memory
, microlens
, text
, time
, transformers

-- Other Project Dependencies
, cardano-crypto

hs-source-dirs:
src
exposed-modules:
Expand Down Expand Up @@ -92,7 +70,6 @@ test-suite unit

build-depends:
base
, cardano-wallet
type:
exitcode-stdio-1.0
hs-source-dirs:
Expand Down

0 comments on commit fa9d69c

Please sign in to comment.