Skip to content
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

Add Coveralls & Stylish Haskell to CI #19

Merged
merged 4 commits into from
Mar 4, 2019
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍

, 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