-
Notifications
You must be signed in to change notification settings - Fork 28
#227 use Github Actions for CI #228
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
Conversation
3173107
to
3c89950
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that one major downside of Github actions (the only significant one, IMO) is that you can't retry a single matrix row. So if the tests can spuriously fails, you better separate it in multiple workflows (this can be done trivially, but turning the whole thing into a local action and then using that from different workflows which just define the matrix variables). But if the test suite rarely / never spuriously fails, then you'll be good.
|
||
jobs: | ||
test: | ||
name: ${{ matrix.compiler }} on ${{ matrix.os }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is already part of the display name in the Github UI so it might be redundant.
matrix: | ||
os: [ ubuntu-latest, windows-latest ] # don't bother with macos-latest | ||
compiler: | ||
- dmd-2.093.1 | ||
- dmd-2.092.1 | ||
- dmd-2.091.1 | ||
- dmd-2.090.1 | ||
- dmd-2.089.1 | ||
- dmd-2.088.1 | ||
- dmd-2.087.1 | ||
- dmd-2.086.1 | ||
- dmd-2.085.1 | ||
- dmd-2.084.1 | ||
- dmd-2.083.1 | ||
- dmd-2.082.1 | ||
- dmd-2.081.2 | ||
- dmd-2.080.1 | ||
- ldc-1.23.0 # eq to dmd v2.093.1 | ||
- ldc-1.22.0 # eq to dmd v2.092.1 | ||
- ldc-1.21.0 # eq to dmd v2.091.1 | ||
- ldc-1.20.1 # eq to dmd v2.090.1 | ||
- ldc-1.19.0 # eq to dmd v2.089.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of duplicating the code you can add matrix row via include
: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the include/exclude options look handy I'll take a look once I've finished getting the tests running. I hate that the supposed unit tests are actually integration tests but would like to run them at least before moving things around.
So far I feel the changes are a lot better than the travis builds. I currently have (https://github.com/SingingBush/mysql-native/actions/runs/867000447) 60 jobs running in about 3 minutes, which includes running the example code against MySQL:
Amen to that. Phobos has this issue as well. If it does IO, it's not an unittest. |
Removed travis file and a load of related scripts that are now redundant. As well as building on a bunch of compiler versions from 2.080 to latest on multiple platforms it also runs the unittest-vibe-ut config on D 2.083 to latest (unit-threaded doesn't like older), and also runs the example project. See passing builds here: https://github.com/SingingBush/mysql-native/actions It would be good to extract some of the test code and make the example project a little more robust. I can help with that as well but it would need this merging first really. There's more to do but this pull request is already fairly large so would rather have this merged then follow up with other changes. |
Looks pretty good. It looks like you are testing with mysql for integration tests, but not mariadb (which seems to be a focus from Nick). I want to keep that at least. Is there a github action mechanism to try mariadb? I will work on extracting the integration tests. |
14189fc
to
243fc1d
Compare
243fc1d
to
db2df74
Compare
I've split it into two files now:
In integration-testing.yml it's running against MySQL 5.7 and Mariadb 10 for now. It's easy to add other versions and I've commented out a block that can be used for testing MySQL 8 once it's supported |
I'm currently trying to extract all dub configurations that make no sense to be in the library to a separate folder, including the app.d which is troublesome here. The integration tests are interspersed throughout the code base, which makes them difficult to extract without ripping them away from the items they are testing. The mysql/test package should be completely extracted. I'm still pondering how to do that, but I do want to do it. At the very least, I want to remove the dependency of unit-threaded from the main library. |
ok, so can this be merged in the meantime? |
I will merge this, but 2 things:
|
Why add them back? it's in the git history so it can be viewed any time. The dub.selections.json was used because before there was a desire to support so many versions of D that you had to have different versions of vibe-core because they don't support as many compiler releases as this project attempts to do. It was pull #215 that added them. There was some logic in ci_setup.d that made use of them:
That's overkill though, simply reducing the scope of compiler versions to support does away with multiple problems as it'll bring your project inline with compilers that your dependencies support. |
I will add them back later. If they are not there, I'll forget about them, since I am super unfamiliar with the way testing is done here. I have a feeling we are going to pretty much have to start over... |
no prob, putting it back now |
Opened this as a work in progress so you have visibility on it. When the issue with dmd 2.095 up is resolved I'll rebase and continue.
I'm not keen on the current tests, the configs for unittest-vibe and unittest-vibe-ut are both for integration tests against a real mysql db. I propose pulling that out into a separate test project. The only tests that should be in the code base should really be unit tests. Perhaps that's something for a future pull request.