Migrate from CircleCI to GitHub Actions #1351
Open
+127
−143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is in response to Issue #1341 "Move from Circle CI to Github Actions".
I took heavy inspiration from the Prometheus implementation here:
https://github.com/prometheus/prometheus/blob/main/.github/workflows/ci.yml
Implementation notes
New secrets are required
You must add the following secrets to be used in the ci.yml GitHub Action:
https://github.com/prometheus/blackbox_exporter/settings/secrets/actions
For my testing, I had to create my own secrets in my forked repository.
Removing skipped tests
In this pull request, I removed all skipped tests that were skipped due to "CI" and validated that they work fine.
Adding skip to TestChooseProtocol
As was called out in #1341, IPv6-related issues were ran into but they appeared to only fail TestChooseProtocol for Windows.
I have adjusted the test to be skipped accordingly under those conditions.
I feel this is fine as we are testing on 2 other OS's.
Testing
In order to test this, I forked the repository and made many commits to my master branch (as that's the branch that I had to apply Actions configurations to for GitHub to pick them up).
Here are the results, laid out by what condition was tested and what the outcome was:
Condition
Create new branch and publish to remote with changes.
Outcome
1 Github Action was triggered and it ran the
Test
job.Condition
Create pull request of new branch to master.
Outcome
1 Github Action was triggered and it ran the
Test
andBuild common architectures
jobs.Condition
Push change / merge pull request into master.
Outcome
1 GitHub Action was triggered and it ran the
Test
,Build all architectures
, andPublish master
jobs.DockerHub’s master tag was updated.
Quay’s master tag was updated.
Condition
A release PR is created and merged into master.
A tag for v0.30.0 is created:
Outcome
1 GitHub Action was triggered, and it ran the
Test
,Build all architectures
, andPublish release
jobs.A release for v0.30.0 was created.
DockerHub’s master tag was updated.
Quay’s master tag was updated.