Open thomasplevy opened 2 years ago
How to create a status badge for a GH Action Workflow:
https://user-images.githubusercontent.com/1290739/135891932-50399ba3-ab6f-498b-a484-bc0e3c44cb58.mp4
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.
@pondermatic I'll add them. i didn't realize secrets were only available to repo owner .
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
.
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: https://github.com/gocodebox/.github/issues/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
(or do dev first and then sync to trunk if you're more comfortable with that)
@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)
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.
.
The branch requires signed commits, are your commits not signed?
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?
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 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.
@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).
Once we get GitHub workflows to run successfully, should we delete the failed runs?
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
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.
@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
Thank you @eri-trabiccolo! Your suggested procedure worked perfectly.
My commits to my local
trunk
branch ofgocode/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...
@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
@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: I do not have access to the help@lifterlms.com mailbox.
I was able to use my own Twilio account to run the tests successfully.
Once we get GitHub workflows to run successfully, should we delete the failed runs?
@pondermatic Nope, don't bother, who cares!
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 do not have access to the help@lifterlms.com mailbox.
Yes you do, it's the support inbox in HelpScout (recently renamed to "Conversation Team"
It seems that the
lifterlms-integration-twilio
project needs some secret environment variables set in order to run unit tests.
Added
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.
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?
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.
@thomasplevy Trying to summarize below:
trunk
doesn't have php tests, but the branch 2.0 on which you're working on does have them, I thought you wanted to do the migration directly on 2.0? Dunno.trunk
, but the new ones in dev
pass.trunk
, couldn't push on dev
after a rebase, see https://github.com/gocodebox/.github/issues/21#issuecomment-937627335@eri-trabiccolo force push has been enabled for the dev branch on the lifterlms-rest
My commits to my local
trunk
branch ofgocode/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.
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:
Remove composer.lock file
Remove the composer scripts
install-php8
&tests-install-php8
Change the required version of
lifterlms-tests
to be^3.1.0
Add
composer.lock
to the.gitignore
fileAdd results caching file location in the tmp dir by adding
cacheResultFile="tmp/.phpunit.result.cache"
to thephpunit.xml.dist
fileRun tests, fix anything that fails
setUp()
,tearDown()
,setUpBeforeClass()
andtearDownAfterClass()
should be replaced with snake-case equivalents:set_up()
,tear_down()
, etc...assertEqualsWithDelta()
in favor ofassertEquals()
with the delta passed as the 4th param. If we miss these well catch them when tests intermittently fail later, this is less problematic (and obvious)Check
.travis.yml
for "extra" jobs (other than the standard matrix.github/workflow-matrix.yml
IF the repo has a non-standard job (see docs and talk to me if you're not sure)Remove
.travis.yml
Add
.github/CODEOWNERS
Remove
.github/ISSUE_TEMPLATE/
and.github/PULL_REQUEST_TEMPLATE.md
(these are automatically used from this repo if none are found in the repo's .github dir, so they're redundant and can be removed)Remove travis badges from the
README.md
file and add PHPCS, coding standards, and test coverage badges from the GH workflowsCreate the
CC_TEST_REPORTER_ID
repository secretCommit and push everything (trunk & dev)
Make sure everything runs / passes / etc...
Talk to me about problems
[x] https://github.com/gocodebox/lifterlms
[x] https://github.com/gocodebox/lifterlms-advanced-quizzes
[x] https://github.com/gocodebox/lifterlms-advanced-videos
[x] https://github.com/gocodebox/lifterlms-assignments
[x] https://github.com/gocodebox/lifterlms-blocks
[x] https://github.com/gocodebox/lifterlms-convertkit
[ ] https://github.com/gocodebox/lifterlms-cli
[x] https://github.com/gocodebox/lifterlms-custom-fields
[x] https://github.com/gocodebox/lifterlms-gateway-authorize-net
[x] https://github.com/gocodebox/lifterlms-gateway-paypal
[x] https://github.com/gocodebox/lifterlms-groups
[x] https://github.com/gocodebox/lifterlms-helper
[ ] https://github.com/gocodebox/lifterlms-integration-formidable-forms
[x] https://github.com/gocodebox/lifterlms-integration-gravity-forms
[x] https://github.com/gocodebox/lifterlms-integration-ninja-forms
[x] https://github.com/gocodebox/lifterlms-integration-twilio
[x] https://github.com/gocodebox/lifterlms-integration-woocommerce
[x] https://github.com/gocodebox/lifterlms-integration-wpforms
[ ] https://github.com/gocodebox/lifterlms-labs
[ ] https://github.com/gocodebox/lifterlms-lite-lms-progress-tracker
[x] https://github.com/gocodebox/lifterlms-mailchimp
[x] https://github.com/gocodebox/lifterlms-pdfs
[x] https://github.com/gocodebox/lifterlms-private-areas
[x] https://github.com/gocodebox/lifterlms-rest
[x] https://github.com/gocodebox/lifterlms-social-learning
[x] https://github.com/gocodebox/lifterlms-stripe