-
Notifications
You must be signed in to change notification settings - Fork 10
Run unit tests on CI build and wire up to results #29
Comments
I signed the repo up for coveralls.io. I've added the coveralls token to GitHub secrets with the key name COVERALLS_TOKEN |
Minor progress made on this issue today. I added diagnostic logging to the
This line is missing from the logs pulled from the build artifacts. I searched a few issues on the coverlet GitHub repo and found some other people were also getting this issue, specifically this issue. They are getting the same results as us, but when running a deterministic build. Upon checking the csproj files for Ngrok.AspNetCore and Ngrok.ApiClient, I found both had the following lines- <Deterministic Condition="'$(GITHUB_ACTIONS)' == 'true'">True</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">True</ContinuousIntegrationBuild>
<DeterministicSourcePaths Condition="'$(GITHUB_ACTIONS)' == 'true'">True</DeterministicSourcePaths> This points to the most likely cause of the test coverage results working locally (Windows) and on my CentOS box but not in CI is the conditional deterministic build condition on GitHub Actions. I attempted to follow the example deterministic build example, but after a few attempts to get it working, I got stuck at the following error-
There's some light documentation on this error here, but it hasn't proved helpful in getting this working as of yet. I will pick this up again later. Feel free to pick at it in the meantime @kg73 |
@ewisted The test coverage errors were related to the dotnet sdk version the CI build was using. It used to be on 3.1.101. According to this coverlet issue, the issue was resolved in dotnet sdk 3.1.300+, so I upgraded our CI pipeline to use 3.1.401 and now it works correctly. I verified we are getting test coverage pushed to coveralls.io. Feel free to drop your branch and cut a new one from the latest in develop. You'll still need to add the coveralls.io badge to the readme, and add test coverage to the (pre)release build. |
Setup unit test projects to run on the CI github action and publish the results in the artifact drop
The text was updated successfully, but these errors were encountered: