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

Update automation #114

Merged
merged 34 commits into from
Apr 8, 2024
Merged

Update automation #114

merged 34 commits into from
Apr 8, 2024

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Apr 5, 2024

In order to make this repository public again, we needed to create a new Pantheon user with new secrets. While all of those things happened in the background with repository secrets, this PR makes some changes to the existing automations (including the Sage Theme Install test, which is why we needed a SSH key in the first place) to update and optimize them.

The check commits test has been moved to just run on pushes to release as part of the deploy-public-upstream workflow.

Working Sage Install tests can be found here: https://github.com/pantheon-systems/wordpress-composer-managed/actions/runs/8576488930

@jazzsequence jazzsequence changed the title Remove-secrets Update tests Apr 5, 2024
@jazzsequence jazzsequence changed the title Update tests Update automation Apr 5, 2024
when deploy-public-upstream is run
@jazzsequence jazzsequence marked this pull request as ready for review April 5, 2024 22:51
@jazzsequence jazzsequence requested review from a team as code owners April 5, 2024 22:51
pwtyler
pwtyler previously approved these changes Apr 8, 2024
Copy link
Member

@pwtyler pwtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some potential adjustments. I may have missed something on the gha permissions.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/composer-diff.yml Outdated Show resolved Hide resolved
Comment on lines +2 to +4
permissions:
pull-requests: read
contents: read
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these permissions needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we're pulling down the repository and doing a bunch of stuff on it. the tests failed to run without the permissions.


if [ "$(ls -A "$sagedir")" ]; then
echo "${red}Directory not empty!${normal}"
if [ "$is_ci" -eq 1 ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ "$is_ci" -eq 1 ]; then
if [[ "$is_ci" == 1 ]]; then

-eq will error if is_ci is an empty string. I don't see where it's coming from though so possibly this is unnecessary.

@jazzsequence jazzsequence merged commit 988a03f into default Apr 8, 2024
4 checks passed
@jazzsequence jazzsequence deleted the remove-secrets branch April 8, 2024 19:50
jazzsequence added a commit that referenced this pull request Jul 31, 2024
* rename testing.yml to sync-default.yml
because that's what it does, it doesn't test

* bump checkout version

* bump ssh-add version

* give prs read access
so we can get the pull request number

* add contents perms

* drop php 8.0 testing
default upstream php is 8.1 so we can not test older than that

* fix typo

* allow deletion of test sage directory if on ci

* don't fail fast if one of the tests fails

* wait for the operation to complete

* allow steps in the build artifact step to fail

* check for an existing named multidev before creating

* silence the workflow wait

* use latest stable node

* drop php 7.4 tests
bedrock no longer supports

* rename workflow

* use the right command

* update circle image

* better handling for multidev matching

* use latest lts

* use current node version

* switch lint/test to pull request

* bump node setup earleir

* just wait 15 seconds

* don't cache dependencies

* add composer diff

* update php requirement

* run composer update instead of install
make sure we're getting the latest stuff

* only run check-commits on release pushes
when deploy-public-upstream is run

* move stuff around

* move the filter back into the deploy-public-upstream job

* filter check-commits on release, too

* add specific triggers for pull_request

* remove write permission for composer-diff

Co-authored-by: Phil Tyler <[email protected]>

---------

Co-authored-by: Phil Tyler <[email protected]>
jazzsequence added a commit that referenced this pull request Aug 1, 2024
* rename testing.yml to sync-default.yml
because that's what it does, it doesn't test

* bump checkout version

* bump ssh-add version

* give prs read access
so we can get the pull request number

* add contents perms

* drop php 8.0 testing
default upstream php is 8.1 so we can not test older than that

* fix typo

* allow deletion of test sage directory if on ci

* don't fail fast if one of the tests fails

* wait for the operation to complete

* allow steps in the build artifact step to fail

* check for an existing named multidev before creating

* silence the workflow wait

* use latest stable node

* drop php 7.4 tests
bedrock no longer supports

* rename workflow

* use the right command

* update circle image

* better handling for multidev matching

* use latest lts

* use current node version

* switch lint/test to pull request

* bump node setup earleir

* just wait 15 seconds

* don't cache dependencies

* add composer diff

* update php requirement

* run composer update instead of install
make sure we're getting the latest stuff

* only run check-commits on release pushes
when deploy-public-upstream is run

* move stuff around

* move the filter back into the deploy-public-upstream job

* filter check-commits on release, too

* add specific triggers for pull_request

* remove write permission for composer-diff

Co-authored-by: Phil Tyler <[email protected]>

---------

Co-authored-by: Phil Tyler <[email protected]>
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