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

github-actions validation checker for PRs and master branch #1476

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

laurb9
Copy link
Contributor

@laurb9 laurb9 commented Sep 3, 2020

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

Screen Shot 2020-09-03 at 10 48 45 AM

@SyntaxNode
Copy link
Contributor

Interesting. I'm not familiar with GitHub Workflows. A few questions...

Is this a proposal to replace Travis with GitHub Workflows?
Is this a service provided by Github itself? aka.. who's servers are running the validations?
Is there an equivalent badge we can use to replace the Travis Build Status icon?
How and who can trigger a rebuild?

Travis has been very flaky recently, so I'm game to try something new.

@laurb9
Copy link
Contributor Author

laurb9 commented Sep 3, 2020

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

[![Actions Status](https://github.com/{owner}/{repo}/workflows/{workflow_name}/badge.svg)](https://github.com/{owner}/{repo}/actions)

@SyntaxNode
Copy link
Contributor

I'm a big fan of this. I'll discuss with the team internally next week.

SyntaxNode
SyntaxNode previously approved these changes Sep 8, 2020
Copy link
Contributor

@SyntaxNode SyntaxNode left a 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.

strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
os: [ubuntu-latest]
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@hhhjort hhhjort merged commit 420da24 into prebid:master Sep 9, 2020
@laurb9 laurb9 deleted the pr-check branch September 14, 2020 18:04
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.

3 participants