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 stack support #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mizunashi-mana
Copy link

@mizunashi-mana mizunashi-mana commented Jun 7, 2017

@mizunashi-mana mizunashi-mana force-pushed the add-stack-support branch 3 times, most recently from 183bd05 to 651d9db Compare June 8, 2017 02:50
@killy971
Copy link
Owner

Someone created a pull request to add a similar feature to codecov-haskell: killy971/codecov-haskell/pull/12
That change seems simpler, but I can't judge yet whether it provides the same flexibility as your change...

@mizunashi-mana
Copy link
Author

@guillaume-nargeot OK, I modified my changes to refer to killy971/codecov-haskell#12

My changes provide below searching flows:

  1. If use-stack-cov enabled, only using stack coverage reports
  2. Both tix-dir/mix-dir provided, use this directories
  3. Other case:
    1. Searching default coverage reports (dist/hpc/dist/hpc/vanilla)
    2. Searching stack coverage reports (stack path --local-hpc-dir)
  4. If not found hpc directories, failed and show error messages

And, to detect stack:

  1. Run stack --version, then if DoesNotExistError raised, failed to use stack
  2. Detect a stack project to use stack path --project-root, then if this is not a stack project, failed to use stack

@coveralls
Copy link

coveralls commented Jun 18, 2017

Coverage Status

Coverage decreased (-0.2%) to 36.0% when pulling 1544d05 on mizunashi-mana:add-stack-support into 04fe42c on guillaume-nargeot:master.

@coveralls
Copy link

coveralls commented Jun 18, 2017

Coverage Status

Coverage decreased (-0.2%) to 36.0% when pulling 1544d05 on mizunashi-mana:add-stack-support into 04fe42c on guillaume-nargeot:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 36.0% when pulling 1544d05 on mizunashi-mana:add-stack-support into 04fe42c on guillaume-nargeot:master.

@MarisaKirisame
Copy link

Can you merge this? I am currently trying to move the hpc generated by stack into cabal's place, but it is failing horribly. Or just some pointer toward what I am doing wrong will help, thx
https://travis-ci.org/ThoughtWorksInc/DeepDarkFantasy#L779

@jBugman
Copy link

jBugman commented Aug 17, 2017

@MarisaKirisame While we wait on it being merged, I just built it in a fork:

Install binary (I did it once in my Docker image):

wget -qO- https://github.com/jBugman/hpc-coveralls/releases/download/stack/coveralls.tar.gz | \
    tar xvz -C {DIR_IN_A_PATH}

Upload report:

timeout 10
hpc-coveralls {TEST_SUITE_NAME}
--tix-dir=$(stack path --local-hpc-root)/{LIBRARY_NAME}
--mix-dir=$(stack path --dist-dir)/hpc
--repo-token=$COVERALLS_TOKEN
|| true

Timeout is there because it just hangs after a successful upload for a more than a minute for some reason.

@MarisaKirisame
Copy link

Thx, I had already used stack-hpc-coveralls, it is working well. @jBugman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stack support
5 participants