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

Add Github Actions Workflow for Automated Testing #816

Merged
merged 31 commits into from
Oct 31, 2021

Conversation

wrharding
Copy link
Collaborator

I've added all currently supported OS's to Github Actions workflow's. Github Actions is completely free for public repositories and could provide a more uniform test bed for PR's. It has performed similarly, if not faster than my host machine. See wrharding/mhn/actions

The Ubuntu 16.04 and CentOS 6 Workflow's are spun up via Vagrant with Virtual Box on a Mac OS 10.15 Runner. Mac OS is the only Runner that currently supports virtualization and will need to be utilized if anything besides Ubuntu >= 18.04 is to be supported by this project. See actions/runner-images#3287 for the unfortunate timing of Ubuntu 16.04 Runner depreciation this month.

I'm submitting this PR as a draft for consideration as I look into adding Workflows for Ubuntu 20.04 (see #778, #779, and #793), Debian 9 (#695), Debian 10 (#790), and CentOS 7 (#542 and #748). I'm hoping for a worthwhile discussion on utilizing Actions and how it can be best utilized for this project.

Wiliam Harding and others added 26 commits October 5, 2021 19:43
Adding Github Actions to validate dependencies for MHn install on Ubuntu 18.04
Adding CentOS 6 and Ubuntu 16.04 Workflows
Add Github Actions Workflow for Ubuntu 20.04
@wrharding
Copy link
Collaborator Author

The Vagrantfile has been updated to include all three supported OS's.

@wrharding wrharding marked this pull request as ready for review October 15, 2021 20:30
@wrharding
Copy link
Collaborator Author

wrharding commented Oct 15, 2021

For consideration: Github Actions

I will say that running 4 actions with notifications was a small mistake on my part so whomever is the maintainer of this repo will want notifications turned off. See my page for the resultant spam: https://github.com/wrharding/mhn/actions

Additionally, I've held off on adding Debian 9/10 and CentOS 7 Workflows until this PR has been reviewed. I'm more than happy to make said Workflows after an initial review.

@d1str0
Copy link
Collaborator

d1str0 commented Oct 16, 2021

The actions are triggered for this branch only, not for master/main.

@wrharding
Copy link
Collaborator Author

I don't merge into the master branch of my fork of MHN, therefore I need the trigger branch to be different. I'll change the trigger branch to master when you're ready.

@d1str0
Copy link
Collaborator

d1str0 commented Oct 16, 2021

Now is fine.

@wrharding
Copy link
Collaborator Author

@d1str0, I believe this is ready for review. The one caveat is Vagrant cloud responding with a 429 if you request the same box 15-30 minutes a part.

Also noteworthy: These Workflows only test the dependencies of MHN. Without a mock config.py file there is no way to test a fully deployment. On that note though, how was CircleCI previously setup? I see it keeps failing because the configuration file no longer exists for it.

@d1str0
Copy link
Collaborator

d1str0 commented Oct 16, 2021

We probably want to cache the vagrant box so it doesnt need to be downloaded every time.

I dont remember exactly what circleci did, but I dont think we ever got it working fully.

@wrharding
Copy link
Collaborator Author

We probably want to cache the vagrant box so it doesnt need to be downloaded every time.

I based the Vagrantfile workflows on this repo: jonashackt/vagrant-github-actions
While the workflows do cache the Vagrant boxes, caching only happens after a successful run. If the Vagrantfile ever gets changed, the cache is remade.

@wrharding
Copy link
Collaborator Author

@d1str0, I've been thinking about the addition of Debian 9/10/11 and CentOS 7 Workflows recently. They're easy to create but I don't want to add them for the sake of itself. They're not listed on the README.md as a supported OS's. I've added Ubuntu 20.04 only because Ubuntu 16.04 is EoL (soon to be out of extended, paid support) and I'm assuming the project will want to move to a supported OS.

@wrharding
Copy link
Collaborator Author

Any comments or concerns about this merge?

@wrharding
Copy link
Collaborator Author

@d1str0 Any thoughts on this merge? Questions or concerns?

@d1str0 d1str0 merged commit 17e2b18 into pwnlandia:master Oct 31, 2021
@wrharding wrharding deleted the hacktoberfest/add-gh-actions branch October 31, 2021 16:56
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