Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

CI/CD Improvements #170

Merged
merged 10 commits into from
Jan 13, 2022
Merged

CI/CD Improvements #170

merged 10 commits into from
Jan 13, 2022

Conversation

JacobMGEvans
Copy link
Contributor

@JacobMGEvans JacobMGEvans commented Dec 14, 2021

CI/CD Release Workflow & other improvements

Tests run before other workflows

To be sure that Tests and type checking is occurring on code before it is merged and released other workflows have the Testing workflow as a trigger. For example the Tests need to complete and be successful before the prerelease will run.

Release flow triggered on PR's closed

Whenever the a PR is closed/merged the Workflow will trigger for checking for a changeset and adding it to the changeset "Version" PR, when the "Version" PR is closed/merged it will trigger a release.

Consolidated old workflows as jobs in new workflows

Combined the old workflows with new workflows that have similar behavior & shared similar event triggers.

@JacobMGEvans JacobMGEvans changed the title CI/CD Improvements: CI/CD Improvements Dec 14, 2021
@JacobMGEvans JacobMGEvans marked this pull request as draft December 14, 2021 23:04
@JacobMGEvans JacobMGEvans marked this pull request as ready for review December 15, 2021 21:46
@JacobMGEvans
Copy link
Contributor Author

JacobMGEvans commented Dec 17, 2021

@petebacondarwin mind taking a look at this PR

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

I think we can piggy back on a lot of the learning from the wrangler2 project from the last few days.

.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Outdated Show resolved Hide resolved
@threepointone
Copy link
Contributor

We also have to make changes to the way the automated types are generated internally to include a changeset.

@JacobMGEvans
Copy link
Contributor Author

We also have to make changes to the way the automated types are generated internally to include a changeset.

I will make the necessary changes for the current changes, however, I will hold off on the PR then until we can talk more about this.

@JacobMGEvans
Copy link
Contributor Author

We also have to make changes to the way the automated types are generated internally to include a changeset.

@threepointone There are two possible ways to do this from what I can tell.

  1. So I have looked at the code in the edgeworker that does the "publish" (PR creation) it uses Octokit, I can figure out how to use that API to include a changeset. Might involve adding changesets creation to step 2, where the files are added/generated

  2. Create a GH Action that runs on these particular PRs to create a changeset using NPX.

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

Dropped some suggestions

.github/workflows/release.yml Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Outdated Show resolved Hide resolved
.changeset/config.json Outdated Show resolved Hide resolved
.github/workflows/typechecks.yml Show resolved Hide resolved
@JacobMGEvans JacobMGEvans force-pushed the feat/workflows-changsets branch 4 times, most recently from 2bec861 to 66aab9d Compare January 6, 2022 18:08
@JacobMGEvans
Copy link
Contributor Author

We also have to make changes to the way the automated types are generated internally to include a changeset.

Internal PR merged for changesets

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@JacobMGEvans JacobMGEvans force-pushed the feat/workflows-changsets branch 2 times, most recently from 73e3093 to 243d358 Compare January 12, 2022 21:08
Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

I think we need to recommend adding the prettier extension, and format on save, so people don't get frustrated when they try to send a PR. Copy relevant bits from https://github.com/cloudflare/wrangler2/tree/main/.vscode?

package.json Outdated Show resolved Hide resolved
@JacobMGEvans
Copy link
Contributor Author

And why shouldn't we run prettier on all files?

I am gonna set up Prettier to run on all of the files 👍🏻

Jacob and others added 8 commits January 13, 2022 11:41
- Added Changeset PR creation & publish Workflows
- Added Typechecking workflow
- Consolidated old workflows as jobs in new workflows

removed build from Testing CI/CD
… working for Changesets and triggering events
- Markdownlint required a global or NPX implementation in CI
- Prettier configs tweaked to minimize changes to Markdown docs
Co-authored-by: Sunil Pai <spai@cloudflare.com>
…recs and formatter default, updated gitignore
.changeset/config.json Outdated Show resolved Hide resolved
Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

I think this looks good, so let's land it and see.

@JacobMGEvans JacobMGEvans merged commit 771ce75 into master Jan 13, 2022
@JacobMGEvans JacobMGEvans deleted the feat/workflows-changsets branch January 13, 2022 21:48
@github-actions github-actions bot mentioned this pull request Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants