Skip to content

Comments

Add Heroku Testpack API support#77

Open
jbowtie wants to merge 5 commits intojincod:masterfrom
jbowtie:add-testpack-api
Open

Add Heroku Testpack API support#77
jbowtie wants to merge 5 commits intojincod:masterfrom
jbowtie:add-testpack-api

Conversation

@jbowtie
Copy link

@jbowtie jbowtie commented Mar 5, 2019

This adds initial Testpack API support.

I have made a TAP logger for Heroku's preferred output format but it's not required for actual compliance so will defer that to a future pull request.

@jincod
Copy link
Owner

jincod commented Mar 6, 2019

Hi @jbowtie,

Thank you for your contribution💪

We need to think about how to avoid duplication between compile, test and test-compile

@jbowtie
Copy link
Author

jbowtie commented Mar 6, 2019

I've been looking at how other buildpacks do it and it looks like the typical approach is to have test-compile explicitly set some environment variables and then delegate to compile -- that eliminates the bulk of the duplication.

The test script needs a bit more thought because as currently written it fails to locate the dotnet executable; I need a better understanding of what the environment looks like when it gets invoked.

@jbowtie
Copy link
Author

jbowtie commented Mar 7, 2019

This should be much clearer with less duplication.

@stormsilver
Copy link

I've been testing this in our Gitlab CI pipeline which runs within the herokuish project. Our project uses the coverlet package for collecting test coverage.

This PR caused the buildpack to correctly build and run the tests. 👍 However, coverlet was unable to properly collect the test coverage - there's something about being built in one directory and then running the tests in a different directory that it doesn't like. I'm not a .NET developer so I was unable to diagnose it further than that.

I was able to make it work properly by moving the dotnet build command from test-compile -> test, like so:

dotnet build $TEST_PROJECT_FILE --configuration Debug
dotnet test -v q --no-build

I'm not sure if I'm doing something wrong or if the setup in this PR isn't generic enough.

@prat0088
Copy link

@jbowtie What is needed before this can be merged? Are you able to reproduce @stormsilver 's regarding collecting test coverage?

We've been needing testpack support for quite some time. Is there anything I can do to help get this merged?

@jincod

@jincod
Copy link
Owner

jincod commented Dec 12, 2019

Hi there,

I've merged branch @jbowtie and done some modifications. I decided don't change main compile because it is very stable now and I duplicated compile logic to test-compile.

Also we don't need specify test-project-file. dotnet build and dotnet test should be enough.

Could you check please https://github.com/jincod/dotnetcore-buildpack#jbowtie-add-testpack-api?

@jincod
Copy link
Owner

jincod commented Jan 23, 2020

Hi there,

Could someone help with that #98 (comment)?

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.

4 participants