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 GitHub CI workflow #19

Merged
merged 2 commits into from
Sep 23, 2020
Merged

Update GitHub CI workflow #19

merged 2 commits into from
Sep 23, 2020

Conversation

whymarrh
Copy link
Contributor

@whymarrh whymarrh commented Sep 23, 2020

This change updates the GitHub Actions workflow used for CI, adding names to the jobs as well as a terminal job that will simplify the process of adding required status checks to branches.

Having a known terminal job that is consistent across all projects make it easy to add a required status check for a branch—one that will not change as new intermediate jobs are added.

I've added a lint step and the flags from our existing CircleCI config as well.

@whymarrh whymarrh marked this pull request as ready for review September 23, 2020 16:44
@whymarrh whymarrh requested a review from a team as a code owner September 23, 2020 16:44
@whymarrh whymarrh force-pushed the update-actions-workflow branch 2 times, most recently from e33dcf9 to 47e7eaa Compare September 23, 2020 16:55
This change updates the GitHub Action workflow used for CI, adding
names to the jobs as well as a terminal job that will simplify the
process of adding required status checks to branches.

Having a known terminal job that is consistent across all projects
makes it easy to add a required status check for a branch—one that
will not change as new intermediate jobs are added.

A lint task and the appropriate `yarn` flags have been added as well.
@whymarrh
Copy link
Contributor Author

I've created #20 to represent the work required to get the lint command going again

needs:
- build
steps:
- uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

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

Could this step me omitted? 🤔 I don't see much utility in checking out the repo here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There needs to be some step and this seems like a harmless empty step

Copy link
Member

Choose a reason for hiding this comment

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

OK, fair enough. I wasn't aware a step was required. We can replace this later with something more lightweight if need be.

@whymarrh whymarrh force-pushed the update-actions-workflow branch 2 times, most recently from a679f72 to 9771ad0 Compare September 23, 2020 17:19
on:
push:
branches: [ main ]
pull_request:
Copy link
Member

@Gudahtt Gudahtt Sep 23, 2020

Choose a reason for hiding this comment

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

Note that this does need to be pull_request_target for any of our action workflows that require secrets, since those won't be provided on forks 🤔

pull_request seems perfectly fine to use on repos without secrets though - maybe even preferable, as testing changes to the workflows is easier with pull_request. So maybe this is fine as a default.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since we want to add npm publishing eventually, this seems like an important suggestion, though I'm not sure it needs to block this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Publishing would run post-merge, so that would be from the push event. I don't think using pull_request poses any challenges there.

My comment was more about status checks that use secrets, such as on metamask_extension where our CI builds have valid non-production Sentry and Matomo keys.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@danfinlay danfinlay merged commit 6b812d8 into main Sep 23, 2020
@danfinlay danfinlay deleted the update-actions-workflow branch September 23, 2020 23:53
Gudahtt added a commit that referenced this pull request May 10, 2021
The "all-jobs-pass" job no longer checks out the repository. It had
only included a checkout as a placeholder step [1], but this isn't
necessary anymore now that we have the "Great success!" message. That
can serve as our placeholder instead.

[1]: #19 (comment)
Gudahtt added a commit that referenced this pull request May 10, 2021
The "all-jobs-pass" job no longer checks out the repository. It had
only included a checkout as a placeholder step [1], but this isn't
necessary anymore now that we have the "Great success!" message. That
can serve as our placeholder instead.

[1]: #19 (comment)
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.

3 participants