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

Run tests as part of CI #67

Merged
merged 15 commits into from
Apr 11, 2022
Merged

Run tests as part of CI #67

merged 15 commits into from
Apr 11, 2022

Conversation

mrlacey
Copy link
Contributor

@mrlacey mrlacey commented Apr 7, 2022

Integrate running unit tests as part of the PR CI

For #48

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

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

Looks like they ran great on the last past. Do we know how test results are bubbled up in GitHub actions? (Like if they fail I assume the build will fail, but if we want to search/look up the output for an individual test, can we do that easily somehow?)

.github/workflows/build.yml Show resolved Hide resolved
@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 7, 2022

Looks like they ran great on the last past. Do we know how test results are bubbled up in GitHub actions? (Like if they fail I assume the build will fail, but if we want to search/look up the output for an individual test, can we do that easily somehow?)

I'll push an update with a failing test so it can be seen.

@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 8, 2022

Looks like they ran great on the last past. Do we know how test results are bubbled up in GitHub actions? (Like if they fail I assume the build will fail, but if we want to search/look up the output for an individual test, can we do that easily somehow?)

I'll push an update with a failing test so it can be seen.

So, good news, a failing test does fail the CI checks.

The details of why it failed aren't always going to be super obvious. (We don't even get coloring.)
But, at least we get the name of the failed test, next to the "Failed" keyword, and a stacktrace.
Where I've seen a small number of failures amongst a large number of tests, the failures do stand out more obviously than here.

image

Removing the failed test now.

@michael-hawker
Copy link
Member

@mrlacey looks like we may need another action to push/bubble results. This one looked interesting: https://github.com/marketplace/actions/test-reporter, though there's an updated clone here in the marketplace that I'm looking to get info on: https://github.com/phoenix-actions/test-reporting

Once the repo is public, I think we could maybe just try this one as well: https://github.com/marketplace/testspace-com/plan/MDIyOk1hcmtldHBsYWNlTGlzdGluZ1BsYW41OTc0#pricing-and-setup

@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 8, 2022

@mrlacey looks like we may need another action to push/bubble results. This one looked interesting: https://github.com/marketplace/actions/test-reporter, though there's an updated clone here in the marketplace that I'm looking to get info on: https://github.com/phoenix-actions/test-reporting

Once the repo is public, I think we could maybe just try this one as well: https://github.com/marketplace/testspace-com/plan/MDIyOk1hcmtldHBsYWNlTGlzdGluZ1BsYW41OTc0#pricing-and-setup

What's the desired output?
Or is it a case of see what we can get and then decide?

@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 9, 2022

This is from a passing test, the output looks like this:

image

And the details:

image

I'll now rerun with a deliberately failing test.

@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 9, 2022

And here's what we'll see when there's a failling test:

image

details:

image

and

image

Removing failing test now

@mrlacey
Copy link
Contributor Author

mrlacey commented Apr 9, 2022

The CI test reports are currently created with https://github.com/dorny/test-reporter
and could easily be switched to https://github.com/phoenix-actions/test-reporting if necessary.

It's also using a format that's supported by https://github.com/marketplace/testspace-com so switching to that should be painless if we eventually want to move to that.

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

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

Looks great @mrlacey! Good to know everything looks fairly interchangeable. I'll look into the Testspace system a bit more after the repo goes public. Opened #72 for tracking.

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.

2 participants