Permalink
Browse files

Fix code cov (#156)

* Ignore hpc

* Use forked branch avoid codecov-haskell error

* Using copy-bins

* Set mix, tix dir

* Style adjustments on .travis.yml  [changelog skip]

* codecov-haskell command is not installed

[changelog skip]

* Fix the way to install codecov-haskell

[changelog skip]

* Specify upload token [changelog skip]

* codecov-haskell doesn't work on Windows/AppVeyor

[changelog skip]
  • Loading branch information...
ipdae authored and dahlia committed Feb 12, 2018
1 parent e34e854 commit fc3eddb53998a6bede56d59a14b26f59c10b90db
Showing with 59 additions and 21 deletions.
  1. +1 −0 .dockerignore
  2. +1 −0 .gitignore
  3. +45 −21 .travis.yml
  4. +11 −0 codecov.yml
  5. +1 −0 stack.yaml
@@ -1,3 +1,4 @@
.git
.stack-work
dist
*.hpc
@@ -8,3 +8,4 @@ __pycache__
.tox
*.egg-info
*.cabal
*.hpc
@@ -1,6 +1,7 @@
dist: trusty
sudo: false
language: c
matrix:
include:
- os: osx
@@ -16,14 +17,17 @@ matrix:
- python3.6
- libgmp10
- upx-ucl
env:
- PIP_MINVER=9.0.1 SETUPTOOLS_MINVER=36.6.0
cache:
directories:
- "$HOME/.cabal"
- "$HOME/.stack"
- "$HOME/.ghc"
- "$HOME/Library/Caches/Homebrew"
before_install:
- grep 2016–`date +%Y` package.yaml # Check copyright year
@@ -81,6 +85,7 @@ before_install:
fi
- curl -o "$HOME/.local/bin/travis_long" -L https://raw.githubusercontent.com/futurice/fum2github/master/travis_long
- chmod +x "$HOME/.local/bin/travis_long"
install:
- |
if python3 -c "import pip"; then
@@ -102,12 +107,38 @@ install:
- travis_long stack --no-terminal setup
- travis_long stack --no-terminal install scan -j4
- travis_long stack --no-terminal install -j4 --only-dependencies
script:
- 'TOX="$(which tox)" stack --no-terminal test -j4 --coverage'
- ./lint.sh
after_script:
- stack install --install-ghc --no-terminal codecov-haskell
- codecov-haskell Main
- |
# Since codecov-haskell doesn't work on Windows,
# it should be added to extra-deps during only Travis CI build.
sed -i 's|^## *INSERT CODECOV HERE.*$|- {"git": "https://github.com/spoqa/codecov-haskell.git", "commit": "8448801f8d01624e4cd60420beb3fdc85c099576"}|' stack.yaml
- stack build --install-ghc --no-terminal --copy-bins codecov-haskell
- find . -name '*.tix'
- find . -name '*.mix'
- |
token_encoded='NTBjYmQ4ZTgtN2Y4Ni00Mzg4LWIyN2EtMzMzMzhiNjUwZjc3'
stack exec -- codecov-haskell \
--tix-dir ./.stack-work/install/x86_64-*/lts-*/*/hpc/nirum/ \
--mix-dir ./.stack-work/dist/x86_64-*/Cabal-*/hpc/ \
--print-response \
--display-report \
--token="$(echo $token_encoded | python -m base64 -d)" \
spec
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/29cc2477daa438db4e9d
- 'http://travis-auto-rebuilder.herokuapp.com/76caecf7-abe1-4122-9fcc-aa5226dc10f8/?jobs=1&subject-to=2&retries=5'
on_success: change
on_failure: always
on_start: never
before_deploy:
- stack build --no-terminal --copy-bins
- mkdir -p /tmp/nirum-build
@@ -118,23 +149,16 @@ before_deploy:
then
upx-ucl -9 "$NIGHTLY_BINARY_PATH"
fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/29cc2477daa438db4e9d
- 'http://travis-auto-rebuilder.herokuapp.com/76caecf7-abe1-4122-9fcc-aa5226dc10f8/?jobs=1&subject-to=2&retries=5'
on_success: change
on_failure: always
on_start: never
deploy:
- provider: s3
local_dir: /tmp/nirum-build
on:
branch: master
upload-dir: travis-builds
acl: public_read
bucket: nightly-builds.nirum.org
access_key_id:
secure: "lqNHSWpskIWHBZdeUsT1LpUBnDv88vEdSwCX2vY+3hbspB2dEoeyxrQ3ObyHBvxizuxHC+wBKdCfpEUj9CuZTSZDuS0gbuks46IH5az5SmFFDRk/pq+5sSBte070YQfrJCEgFTiEww8LZCVjjySEqez0f1pQV4ZSmy8u8ME2PzF1jQdGZIUB/e3v7JAjhK3nKh2kt2YnEdscHngbmRaDkcpEmbia8fP9a9sRc9n4dG5m0/3vtuZJcUqrJzdqMfluwz9lOSWIjSCE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o1wy/kcngmYbOqqBD3zKm8XcDqwkoAA4="
- provider: s3
local_dir: /tmp/nirum-build
on:
branch: master
upload-dir: travis-builds
acl: public_read
bucket: nightly-builds.nirum.org
access_key_id:
secure: "lqNHSWpskIWHBZdeUsT1LpUBnDv88vEdSwCX2vY+3hbspB2dEoeyxrQ3ObyHBvxizuxHC+wBKdCfpEUj9CuZTSZDuS0gbuks46IH5az5SmFFDRk/pq+5sSBte070YQfrJCEgFTiEww8LZCVjjySEqez0f1pQV4ZSmy8u8ME2PzF1jQdGZIUB/e3v7JAjhK3nKh2kt2YnEdscHngbmRaDkcpEmbia8fP9a9sRc9n4dG5m0/3vtuZJcUqrJzdqMfluwz9lOSWIjSCE3iClSrH0xrS1b4wIgEa2j5iHgayRwQ2MZN41+nhs+jG18FkSyHqdtZwLGZu8UdW7dQqIaPkk26yFBpHvKESJghh4HGKiijcVw4RNJmgJDpdmCrPU1awAvGdT8CXcbwr/9sqPfKgr1F79xn/7PDe6Nd3GXVRJRkV+g7GhSOCFcjBvEzbq4jmRI8Oo4GnyU0H3Kmgk2OyU0Yhq413cLEVcswyDBSjK+ItQQ/wQZgWL1+Vjh/MQbkESRpkRJK6Oq2y0nYhG/ajIXDuva623MNSaLU42/wku8r//bdbsguNEyncNzWcDwtfGBdyOD8GTLKtJD1tCSTH68b7isDjI/MDmCIay9hgCk/l8pBZgn89jLUDfiqH/ZgQduwKPYUUPUuBUv4YQg7bHeZk2NQSWWGsAfpZ5v9L1qUw="
secret_access_key:
secure: "HUxq2kPTnu3rSq+T7lZoUY4LsvIHjMcapxi5R50gE6pKUIJqJ6ekwB0fP6ge6S6ea3chpAi06oy7tGB4IiTtjUX6L+gOkrFACrWQqVsOvbyMh79oRTVPLY7RTXcDhSmSesChP06oxG2k17u7Agdf5jNfaVH8aOH4xAuBaAYWPTqkIwerGqQHj7oHUGImtu0FDS1ZxL28XiGjONoT2cpoaYT5pzV8KlETe5+ZAr/mxQYHgxt8wzev0pJY6UeBPARiPa1+txEK36AMrHEQHMInZcqgds05T0qX+UF326xlLuFP7soYGRh+mfnvCEx3+hcneX8wJYbaUwpmDrbcCcm91+TUlEWWV3xIXmGHedi0pIvgzH7vapOdzox6MpHGoLJsrRXpHEhMwLMcq0tMbyjcTQjOba2VKRg8hqUBT57oI9Hgpp8wdFnH5EV5GPSOhZ5s4w+PglifEqtqmYHA7PNc5I5iHLXC85UKee+FMQF7hp4heLVQZx541FL7eMYZo2bTOyxTEGMjoxemwN5yHPQ33k7VOKvYLHNX0SxasQme8DwOZbj1ozsWdSPqyArisW0CqXyjFpIm5hPx+gBH1gRXp0hJoyYRBKTrfTxPzFsO5Sf0VfDJC/1UZmzgNULjFdZUdv9/x7O4+Euo1wy/kcngmYbOqqBD3zKm8XcDqwkoAA4="
@@ -0,0 +1,11 @@
coverage:
precision: 2
round: down
range: "70...100"
comment:
layout: "reach, diff, flags, files, footer"
behavior: default
require_changes: yes
require_base: no
require_head: yes
@@ -4,4 +4,5 @@ packages:
- '.'
extra-deps:
- uri-0.1.6.4
## INSERT CODECOV HERE -- DO NOT REMOTE THIS COMMENT. SEE ALSO ISSUE #156. ##
extra-package-dbs: []

0 comments on commit fc3eddb

Please sign in to comment.