Skip to content

Commit

Permalink
Merge pull request #33 from aserto-dev/update
Browse files Browse the repository at this point in the history
update go-grpc
  • Loading branch information
gertd authored Aug 8, 2024
2 parents b31dd0e + 9e7e3fb commit 493b611
Show file tree
Hide file tree
Showing 112 changed files with 2,635 additions and 1,521 deletions.
92 changes: 57 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,79 @@ on:

env:
VAULT_ADDR: https://vault.eng.aserto.com/
BUF_REPO: "buf.build/aserto-dev/aserto"

BUF_VERSION: "1.34.0"
BUF_BETA_SUPPRESS_WARNINGS: 1
GO_VERSION: "1.22"
GO_LANGCI_LINT_VERSION: "v1.56.2"
GO_TESTSUM_VERSION: "1.11.0"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Read Configuration
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: ${{ env.VAULT_ADDR }}
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
kv/data/buf.build "ASERTO_BUF_TOKEN" | ASERTO_BUF_TOKEN;
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
kv/data/github "USERNAME" | GH_USERNAME;
kv/data/github "READ_WRITE_TOKEN" | GH_TOKEN;
kv/data/buf.build "ASERTO_BUF_USER" | BUF_USER;
kv/data/buf.build "ASERTO_BUF_TOKEN" | BUF_TOKEN;
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Install dependencies
-
name: Setup buf
uses: bufbuild/buf-setup-action@v1
with:
version: ${{ env.BUF_VERSION }}
github_token: ${{ github.token }}
buf_user: ${{ steps.vault.outputs.BUF_USER }}
buf_api_token: ${{ steps.vault.outputs.BUF_TOKEN}}
-
name: Delete generated code
run: |
mkdir -p $HOME/.ssh
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa
ssh-keyscan github.com >> $HOME/.ssh/known_hosts
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global user.email "[email protected]"
git config --global user.name "Aserto Bot"
eval `ssh-agent`
ssh-add $HOME/.ssh/id_rsa
go run mage.go deps
- name: Clean generated code
run: go run mage.go clean

- name: Setup Buf Registry
run: echo -e "machine buf.build\npassword ${ASERTO_BUF_TOKEN}" >> ~/.netrc

- name: Generate
run: go run mage.go generate

- name: Commit changes
rm -rf ./aserto
-
name: Get latest version tag from Buf Registry
id: buf-latest
run: |
echo "VERSION=$(buf beta registry label list ${BUF_REPO} --format json --reverse | jq -r '.results[0].name')" >> "$GITHUB_OUTPUT"
-
name: Buf Generate
run: |
echo "${{ env.BUF_REPO }}:${{ steps.buf-latest.outputs.VERSION }}"
buf generate ${{ env.BUF_REPO }}:${{ steps.buf-latest.outputs.VERSION }}
-
name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GO_LANGCI_LINT_VERSION }}
args: --timeout=30m
-
name: Test Setup
uses: gertd/[email protected]
with:
gotestsum_version: ${{ env.GO_TESTSUM_VERSION }}
-
name: Test
run: |
gotestsum --format short-verbose -- -count=1 -parallel=1 -v -timeout=240s -coverprofile=cover.out -coverpkg=./... ./...
-
name: Commit changes
if: github.event_name == 'workflow_dispatch'
uses: EndBug/add-and-commit@v9
with:
Expand Down
6 changes: 3 additions & 3 deletions aserto/api/v1/account.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions aserto/api/v1/change.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions aserto/api/v1/connection.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aserto/api/v1/fields.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aserto/api/v1/identity_context.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aserto/api/v1/invite.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions aserto/api/v1/log.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions aserto/api/v1/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions aserto/api/v1/name_availability.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aserto/api/v1/nats.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 493b611

Please sign in to comment.