-
Notifications
You must be signed in to change notification settings - Fork 760
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
github-actions validation checker for PRs and master branch #1476
Conversation
Interesting. I'm not familiar with GitHub Workflows. A few questions... Is this a proposal to replace Travis with GitHub Workflows? Travis has been very flaky recently, so I'm game to try something new. |
GH action is intended to do CI/CD and more. It's containers running on GH infrastructure, with read-only access to the repo by default. This one is very simple because all it does is greenlight the PR or branch so it definitely can replace Travis in that respect. Builds are possible too using secret tokens but I didn't do that here. https://docs.github.com/en/actions You can use pre-existing (standard) actions, marketplace actions or custom containers. https://github.com/marketplace?type=actions GH actions are enabled by default, I suspect it has not run here because I am not in the org and it's not already in the repo. They can be re-run on demand, from either the Details link provided with the check or from the Actions tab of the repo. Finally, regarding the badge, I looked around and it should work with something like this
|
I'm a big fan of this. I'll discuss with the team internally next week. |
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.
Happy to give it a try. This doesn't look like it disables Travis. We'll run both side by side for a bit until we're comfortable with this as a replacement.
.github/workflows/validate.yml
Outdated
strategy: | ||
matrix: | ||
go-version: [1.13.x, 1.14.x, 1.15.x] | ||
os: [ubuntu-latest] |
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.
In the docker file we build the image on ubuntu 18.04 ... should we mirror that perhaps?
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.
I can change it to ubuntu-18.04, or have both ubuntu-18.04 and ubuntu-20.04.
At the moment ubuntu-latest is the same as ubuntu-18.04: https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
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.
I can change it to ubuntu-18.04, or have both ubuntu-18.04 and ubuntu-20.04.
How about just ubuntu-18.04 and we'll keep it updated along with the docker file. Don't want this matrix to get too large.
Add github-actions PR and master validation checker.
This works everywhere the repo was forked or mirrored without any additional configuration, unlike the Travis setup.
Reference: https://github.com/mvdan/github-actions-golang
Example results because it's not running in the main prebid repo:
openx#7