Skip to content

Run tests in CI, and fail CI if tests fail#10

Open
Leseratte10 wants to merge 1 commit intoChadderz121:masterfrom
Leseratte10:ci_tests
Open

Run tests in CI, and fail CI if tests fail#10
Leseratte10 wants to merge 1 commit intoChadderz121:masterfrom
Leseratte10:ci_tests

Conversation

@Leseratte10
Copy link
Contributor

Now that the CI and all the test stuff is merged, here's another update for that:

With this change to the CI pipeline, all the tests will also run for each commit, and the CI build will fail if any of the tests fail.
The MAKEFLAGS += k makes sure that the tests continue even if one of them fails (so everything gets tested), and the false after a failed test is needed so the final return value of make returns an error so the CI build stops.

# Tests
TEST :=

MAKEFLAGS += k
Copy link
Owner

Choose a reason for hiding this comment

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

Would it make more sense to call make -k rather than trying to edit the arguments from within the makefile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the CI itself, maybe. But that parameter makes sense when manually called from the console as well, right? With the other change, the tests would stop after the first error which is probably not what you want by default, so setting the flag inside the Makefile seemed more useful.

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