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

Migrate from Travis to GitHub Actions #21

Open
22 of 26 tasks
thomasplevy opened this issue Oct 1, 2021 · 31 comments
Open
22 of 26 tasks

Migrate from Travis to GitHub Actions #21

thomasplevy opened this issue Oct 1, 2021 · 31 comments
Assignees

Comments

@thomasplevy
Copy link
Contributor

thomasplevy commented Oct 1, 2021

Alright... we're close enough to everything working that I'm ready to enlist y'all to help get us switched from Travis to GH actions and over to using update WP core utilities for phpunit testing.

Go through your plugins and update/add a codeowners file while you're at it

Updates to be made:

@thomasplevy
Copy link
Contributor Author

How to create a status badge for a GH Action Workflow:

Peek.2021-10-04.09-50.mp4

@pondermatic
Copy link
Contributor

pondermatic commented Oct 5, 2021

Create the CC_TEST_REPORTER_ID repository secret

What should the value be?

@thomasplevy, I do not see the "Settings" menu item for any of the gocodebox projects.

From GitHub Encrypted secrets page:

To create secrets for a user account repository, you must be the repository owner. To create secrets for an organization repository, you must have admin access.

@thomasplevy
Copy link
Contributor Author

@pondermatic I'll add them. i didn't realize secrets were only available to repo owner .

@pondermatic
Copy link
Contributor

Should the .github directory also be in the dev branch, or just the trunk branch? The mail chimp plugin doesn't have it in the dev branch and it looks like Workflow Sync Bot added it to trunk .

@thomasplevy
Copy link
Contributor Author

In almost all scenarios we want to move dev -> trunk but the workflow bot goes straight to trunk because it deploys not distributed files (workflows). One day I'll make a workflow to sync trunk to dev when we push changes directly there: #19

For this particular project it's "safe" to push right to trunk and once the changes are ready sync those over to dev manually

@thomasplevy
Copy link
Contributor Author

(or do dev first and then sync to trunk if you're more comfortable with that)

@thomasplevy
Copy link
Contributor Author

@gocodebox/engineering CC_TEST_REPORTER_ID secret added to all the repos in question and I've updated the test coverage job to be skipped if the secret isn't present (as is the case when running checks on a PR from a fork)

@pondermatic
Copy link
Contributor

I tried to push commits to the trunk branch of gocode/lifterlms-assignments and got error: GH006: Protected branch update failed for refs/heads/trunk..

@thomasplevy
Copy link
Contributor Author

The branch requires signed commits, are your commits not signed?

@pondermatic
Copy link
Contributor

The branch requires signed commits, are your commits not signed?

I set up a GPG key with GitHub and all my recent commits have a "Verified" button in GitHub. "This commit was signed with the committer’s verified signature."

However, when I use the git log --show-signature command, my commits do not show GPG info and yours and Rocco's do. Looks like there's more to configure.

BTW, do we have a place to store our public keys? 1Password maybe?

@pondermatic
Copy link
Contributor

My commits to my local trunk branch of gocode/lifterlms-assignments are signed with a key that is registered with GitHub. However, I get this when I push to origin.

remote: error: GH006: Protected branch update failed for refs/heads/trunk.
remote: error: 4 of 4 required status checks are expected.
To https://github.com/gocodebox/lifterlms-assignments.git
! [remote rejected] trunk -> trunk (protected branch hook declined)
error: failed to push some refs to 'https://github.com/gocodebox/lifterlms-assignments.git'

@pondermatic
Copy link
Contributor

I am able to push signed (and unsigned) commits to the trunk branch of gocodebox/lifterlms-mailchimp.

When I setup signing keys a few weeks ago, I didn't update my global git config to automatically GPG sign all my commits. Even though GitHub shows commits during the past few weeks as "verified", they were not GPG signed. They will be going forward.

@eri-trabiccolo
Copy link
Contributor

@gocodebox/engineering
https://github.com/gocodebox/lifterlms-integration-formidable-forms doesn't have any unit tests at all, no composer scripts no nothing. I just added the CODEOWNERS file and gitignored composer.lock (which btw, doesn't exist).

@pondermatic
Copy link
Contributor

Once we get GitHub workflows to run successfully, should we delete the failed runs?

@eri-trabiccolo
Copy link
Contributor

Once we get GitHub workflows to run successfully, should we delete the failed runs?

I was for the "I don't care" mode on :P eheh

@pondermatic
Copy link
Contributor

For this particular project it's "safe" to push right to trunk and once the changes are ready sync those over to dev manually

In gocodebox/lifterlms-pdfs, I pushed commits to trunk and then cherry picked those commits to dev. The commits have different hashes between trunk and dev. I assumed they would be the same. GitHub suggests that I merge dev to trunk and confusingly the compare looks like the commits to trunk aren't there.

Please help me @gocodebox/engineering. You are my only hope.

@eri-trabiccolo
Copy link
Contributor

eri-trabiccolo commented Oct 6, 2021

@pondermatic
fast way, to me:

  1. delete local dev, pull remote dev
  2. rebase local dev on the new trunk
  3. force push to remote dev
  4. push local dev to remote trunk

@pondermatic
Copy link
Contributor

Thank you @eri-trabiccolo! Your suggested procedure worked perfectly.

@eri-trabiccolo
Copy link
Contributor

My commits to my local trunk branch of gocode/lifterlms-assignments are signed with a key that is registered with GitHub. However, I get this when I push to origin.

remote: error: GH006: Protected branch update failed for refs/heads/trunk.
remote: error: 4 of 4 required status checks are expected.
To https://github.com/gocodebox/lifterlms-assignments.git
! [remote rejected] trunk -> trunk (protected branch hook declined)
error: failed to push some refs to 'https://github.com/gocodebox/lifterlms-assignments.git'

I have a similar issue with the lifterlms-rest:dev branch.
Since the dev branch is some commits ahead of trunk, I rebased it and wanted then to force push it.
Result:

remote: Resolving deltas: 100% (20/20), completed with 8 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/dev.
remote: error: Cannot force-push to this protected branch
To https://github.com/gocodebox/lifterlms-rest
 ! [remote rejected] dev -> dev (protected branch hook declined)
error: failed to push some refs to 'https://github.com/gocodebox/lifterlms-assignments.git'

Note that I did something similar on lifterlms-integration-wpforms:dev and it went through. Also my commits are all verified...

@eri-trabiccolo
Copy link
Contributor

@pondermatic
do we want to work on the remaining repositories owned by Thomas?
If so please tell me on which you're going to work so to avoid overlaps :D

@pondermatic
Copy link
Contributor

@thomasplevy
It seems that the lifterlms-integration-twilio project needs some secret environment variables set in order to run unit tests.

LLMS_TWILIO_SID
LLMS_TWILIO_AUTHKEY

Also, when I tried to log into Twilio to get our authentication to run tests locally, I got this page:
image
I do not have access to the [email protected] mailbox.

I was able to use my own Twilio account to run the tests successfully.

@thomasplevy
Copy link
Contributor Author

Once we get GitHub workflows to run successfully, should we delete the failed runs?

@pondermatic Nope, don't bother, who cares!

@thomasplevy
Copy link
Contributor Author

BTW, do we have a place to store our public keys? 1Password maybe?

You can store your keys in 1pass if you want but, in general I haven't found a need to have a centralized store for our dev public keys... I guess it makes sense to do so but I haven't needed them for anything so...

@thomasplevy
Copy link
Contributor Author

I do not have access to the [email protected] mailbox.

Yes you do, it's the support inbox in HelpScout (recently renamed to "Conversation Team"

@thomasplevy
Copy link
Contributor Author

It seems that the lifterlms-integration-twilio project needs some secret environment variables set in order to run unit tests.

Added

@pondermatic
Copy link
Contributor

BTW, do we have a place to store our public keys? 1Password maybe?

You can store your keys in 1pass if you want but, in general I haven't found a need to have a centralized store for our dev public keys... I guess it makes sense to do so but I haven't needed them for anything so...

I added mine to 1pass today. If the developers had each other's public keys, then the git log --show-signature command would be "prettier". That's about the only benefit I know of. Unless we start encrypting emails to each other. Nah, you'd never read them.

@pondermatic
Copy link
Contributor

It seems that the lifterlms-integration-twilio project needs some secret environment variables set in order to run unit tests.

Added

The LLMS_Twilio_Test_API::test_call_error_400 PHPUnit test fails with error code 20003, permission denied.

LLMS_Twilio_Test_API::test_call_success errors out, but the error is not echoed to the console.

Should I create an issue for these, or is this something you've seen before the change from TravisCI to GitHub actions?

@thomasplevy
Copy link
Contributor Author

The LLMS_Twilio_Test_API::test_call_error_400 PHPUnit test fails with error code 20003, permission denied.

LLMS_Twilio_Test_API::test_call_success errors out, but the error is not echoed to the console.

Should I create an issue for these, or is this something you've seen before the change from TravisCI to GitHub actions?

Please create an issue (in Twilio repo) to track this, I haven't seen this particular error before and I'll need to investigate this further to determine what's happening.

@eri-trabiccolo
Copy link
Contributor

eri-trabiccolo commented Oct 8, 2021

@thomasplevy
Trying to summarize below:

@thomasplevy
Copy link
Contributor Author

@eri-trabiccolo force push has been enabled for the dev branch on the lifterlms-rest

@thomasplevy
Copy link
Contributor Author

My commits to my local trunk branch of gocode/lifterlms-assignments are signed with a key that is registered with GitHub. However, I get this when I push to origin.

remote: error: GH006: Protected branch update failed for refs/heads/trunk.
remote: error: 4 of 4 required status checks are expected.
To https://github.com/gocodebox/lifterlms-assignments.git
! [remote rejected] trunk -> trunk (protected branch hook declined)
error: failed to push some refs to 'https://github.com/gocodebox/lifterlms-assignments.git'

@pondermatic I've turned force-push on for the trunk branch but I'd like to turn it back on after you're done. Let me know when you're happy here and I'll reenable.

@thomasplevy thomasplevy moved this to Awaiting Triage in Development Mar 11, 2022
@thomasplevy thomasplevy moved this from Awaiting Triage to Backlog in Development Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants