-
Notifications
You must be signed in to change notification settings - Fork 2
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
ci: switch to GitHub Actions #323
Conversation
The tests started using os.WriteFile in e09a001 (init: make compatible with Windows, 2023-02-02), but it isn't available until 1.16. We're due for an update of the minimum Go version, but for now just increase to 1.16. As of Go 1.16, ioutil.{ReadFile,WriteFile,ReadFile} are deprecated and just relay functions in io or os. Use the new functions directly. This issue was flagged by the upcoming lint GitHub Actions that runs with the minimum Go version specified in go.mod.
A subset of the integration tests don't require NONMEM. It's convenient to put them so that they can be more easily executed on machines that don't have NONMEM. The upcoming GitHub Actions workflow will execute the integration/postrun tests.
For bbi testing with Drone, we relied on a self-hosted server with NONMEM in order to run the full test suite. At least for now, the plan isn't to mimic that setup with GitHub Actions. Instead set up GitHub Actions to run all the tests that don't require NONMEM, and rely on the full test suite being executed outside of CI.
run: | | ||
bbi version | ||
go test ./integration/postrun | ||
release: |
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.
This release job hasn't been tested. My thinking is that we can do a prerelease after the validation rework lands, and I can adjust as needed then.
shell: bash | ||
run: | | ||
command -v golangci-lint | ||
golangci-lint run --out-format=github-actions |
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.
Here's an example of how this will fail when it flags an issue: https://github.com/metrumresearchgroup/bbi/actions/runs/10321533479
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.
This all looks good to me. I agree with the approach of getting this running and then testing the release step later (with a pre-release).
run all the tests that don't require NONMEM, leaving it to us to execute the full test suite outside of CI (which, at the very least, we'll be doing as part of validation anyway)
Yes, we discussed this and I still think this is the right path forward. Tagging @shairozan here, because this came up in a conversation that we had earlier this week.
The Drone tests for the latest push failed to launch. Given that we have been planning to switch to GitHub Actions, it's not worth it to troubleshoot what's going on. So, this PR does the switch. As discussed offline a few times, the strategy is to go with the GitHub-hosted runners and run all the tests that don't require NONMEM, leaving it to us to execute the full test suite outside of CI (which, at the very least, we'll be doing as part of validation anyway).
There are two prep commits:
go.mod
.)Confirmation that integration/nonmem tests are passing
script