Skip to content

Commit

Permalink
Lint, format and push protos in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
johanstokking committed Aug 4, 2023
1 parent 1d2c0a0 commit cf3fc5f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/bsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Buf Schema Registry

on:
push:
tags:
- "v*"

jobs:
push:
name: Push
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Buf
uses: bufbuild/buf-setup-action@v1
with:
version: "1.25.1"
- name: Push
uses: bufbuild/buf-push-action@v1
with:
input: api
buf_token: ${{ secrets.BUF_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/buf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Buf

on:
- push
- pull_request

jobs:
lint:
name: Lint and Format
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Buf
uses: bufbuild/buf-setup-action@v1
with:
version: "1.25.1"
- name: Buf lint
uses: bufbuild/buf-lint-action@v1
- name: Buf format
run: buf format --exit-code
17 changes: 10 additions & 7 deletions .github/workflows/go-code.yml → .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
name: Go Code
name: Go

on:
- push
- pull_request

jobs:
test:
name: Go Test
runs-on: ubuntu-22.04
timeout-minutes: 10
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "~1.19"
- name: Clean Build
go-version: "~1.20"
- name: Install Buf
uses: bufbuild/buf-setup-action@v1
with:
version: "1.25.1"
- name: Clean and Build
run: make clean build
- name: Go Test
- name: Test
run: make test

0 comments on commit cf3fc5f

Please sign in to comment.