Skip to content

[DO NOT MERGE] PR to test PHPCS workflow formatter - #3351

Open
lukasdchang wants to merge 18 commits into
aws:masterfrom
lukasdchang:phpcs-workflow-tests
Open

lukasdchang wants to merge 18 commits into
aws:masterfrom
lukasdchang:phpcs-workflow-tests

Conversation

@lukasdchang

Copy link
Copy Markdown
Contributor

Description of changes:
This PR serves as a place to test workflow behavior specifically the way the coding-standards job that uses PHPCS and PHPCBF.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89 stobrien89 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looking good- just a couple of comments

jobs:
build_docs:
if: github.repository_owner == 'aws'
if: github.repository_owner == 'aws' && github.event.pull_request.head.ref != 'phpcs-workflow-tests'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this can be removed from here and the other workflow files unless there's something I'm missing

Comment thread src/PhpcsWorkflowTest.php

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will be removed before merging, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a separate branch where I just do testing on it's own PR so I can observe the workflow behavior, it isn't intended to merge. The src/PhpcsWorkflowTest.php file only exists in this testing branch. The actual feature is here #3347

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This branch also skips the other workflow jobs so I don't have to wait a long time for the coding-standards job to finally run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can see the workflow produces the correct violations/comments (with suggested change)- Let's see if we can get this to publish comments on the PR with a suggestion. Smithy does that with incorrect changelog entries here: https://github.com/smithy-lang/smithy/blob/main/.github/workflows/changelog-ci.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! I'll see if i can implement that similarly. I just wanted to get a sort of proof of concept through just the workflow outputs first before getting PR comments to suggest formatting changes.

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