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

Use buf-action in CI #115

Merged
merged 5 commits into from
Jun 4, 2024
Merged

Use buf-action in CI #115

merged 5 commits into from
Jun 4, 2024

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Jun 3, 2024

This updates CI to use the new buf-action replacing buf-setup, buf-lint, buf-breaking and buf-push unifying these tasks as one. The new behaviour is as follows:

  • On pull requests: run build, lint, format and breaking change detection checks.
  • On push: build and then push the changes of the latest commit with the label of the current branch (e.g. main).
  • On delete: archive the label associated with the delete (e.g. the branch name of the PR).

Change in behaviour:

  • Buf version has been set to 1.32.2, the current latest release.
  • Checks no longer block pushes of commits to the BSR.
  • Formatting checks have been added to buf-ci.yaml.
  • Go version has been bumped to the latest minor release, for maintenance reasons only.
  • Use the setup-go cache for better caching of build artifacts.

This updates CI to use the new `buf-action` replacing `buf-setup`,
`buf-lint`, `buf-breaking` and `buf-push` unifying these tasks as one.
The new behaviour is as follows:
- On pull_requests: run lint, format and breaking change detection
  checks.
- On push to main: push the changes of the latest commit with the label
  of the current branch (main).

The following changes were made to support the new aciton:
- The file `.bufversion` at the repository root now controls the version.
  This is read by both the Makefile and the action to fetch the correct
  version of buf.
- Checks no longer block pushes of commits to the BSR.
- Formatting checks have been added to `buf-ci.yaml`.
Copy link

github-actions bot commented Jun 3, 2024

The latest Buf updates on your PR.

NameStatus
build✅ passed
lint✅ passed
format✅ passed
breaking✅ passed

@emcfarlane emcfarlane requested a review from nicksnyder June 3, 2024 19:31
@@ -0,0 +1,18 @@
name: buf
Copy link
Contributor Author

@emcfarlane emcfarlane Jun 3, 2024

Choose a reason for hiding this comment

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

File renamed for improved support for IDEs as buf.yaml will validate the file as a buf configuration file rather than a GitHub actions workflow file.

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
.bufversion Outdated Show resolved Hide resolved
@nicksnyder
Copy link
Member

PR description needs an update based on changes from review comments (e.g. .bufversion, pushing on any branch)

@emcfarlane emcfarlane marked this pull request as ready for review June 3, 2024 21:19
Copy link
Member

@nicksnyder nicksnyder left a comment

Choose a reason for hiding this comment

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

This is what I would expect, but should wait for @bufdev to approve too.

@nicksnyder nicksnyder merged commit 924b04d into main Jun 4, 2024
7 checks passed
@nicksnyder nicksnyder deleted the ed/useBufAction branch June 4, 2024 16:00
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