Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed May 18, 2022
1 parent ef3643c commit e1322d4
Show file tree
Hide file tree
Showing 9 changed files with 691 additions and 386 deletions.
126 changes: 63 additions & 63 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,46 +32,46 @@ on: # yamllint disable-line rule:truthy
- "internal/**"
- "proto/**"
jobs:
build:
name: "Build Binary"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/go-build@main"

image-build:
name: "Build Container Image"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/docker-build@main"
with:
push: false
tags: "authzed/spicedb:ci"
buildx: false
qemu: false
- uses: "authzed/actions/go-test@main"
with:
working_directory: "cmd/spicedb"
tags: "docker"

unit:
name: "Unit"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/go-test@main"
with:
tags: "ci"
# build:
# name: "Build Binary"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - uses: "authzed/actions/go-build@main"
#
# image-build:
# name: "Build Container Image"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - uses: "authzed/actions/docker-build@main"
# with:
# push: false
# tags: "authzed/spicedb:ci"
# buildx: false
# qemu: false
# - uses: "authzed/actions/go-test@main"
# with:
# working_directory: "cmd/spicedb"
# tags: "docker"
#
# unit:
# name: "Unit"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - uses: "authzed/actions/go-test@main"
# with:
# tags: "ci"

e2e:
name: "E2E"
Expand Down Expand Up @@ -121,26 +121,26 @@ jobs:
name: "node-logs"
path: "e2e/newenemy/*.log"

protobuf:
name: "Generate Protobufs"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- name: "Install Go Protobuf plugins"
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
go install github.com/envoyproxy/protoc-gen-validate@v0.6.7
- uses: "authzed/actions/buf-generate@main"
- uses: "bufbuild/buf-breaking-action@v0.4.0"
if: "github.event_name == 'pull_request'"
env:
BUF_INPUT_HTTPS_USERNAME: "${{ github.actor }}"
BUF_INPUT_HTTPS_PASSWORD: "${{ github.token }}"
with:
input: "proto/internal"
against: "https://github.com/authzed/spicedb.git#branch=main,subdir=proto/internal"
buf_token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
# protobuf:
# name: "Generate Protobufs"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - name: "Install Go Protobuf plugins"
# run: |
# go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
# go install github.com/envoyproxy/protoc-gen-validate@v0.6.7
# - uses: "authzed/actions/buf-generate@main"
# - uses: "bufbuild/buf-breaking-action@v0.4.0"
# if: "github.event_name == 'pull_request'"
# env:
# BUF_INPUT_HTTPS_USERNAME: "${{ github.actor }}"
# BUF_INPUT_HTTPS_PASSWORD: "${{ github.token }}"
# with:
# input: "proto/internal"
# against: "https://github.com/authzed/spicedb.git#branch=main,subdir=proto/internal"
# buf_token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
14 changes: 7 additions & 7 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: "Pull Request Labeler"
on: # yamllint disable-line rule:truthy
- "pull_request_target"
jobs:
triage:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/labeler@v3"
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
# triage:
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/labeler@v3"
# with:
# repo-token: "${{ secrets.GITHUB_TOKEN }}"
# sync-labels: true
128 changes: 64 additions & 64 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,67 @@ on: # yamllint disable-line rule:truthy
pull_request:
branches: ["*"]
jobs:
unit-analyzers:
name: "Unit Test Analyzers"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/go-test@main"
with:
working_directory: "tools/analyzers"

go-lint:
name: "Lint Go"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/gofumpt@main"
- uses: "authzed/actions/go-mod-tidy@main"
- uses: "authzed/actions/go-mod-tidy@main"
with:
working_directory: "e2e"
- uses: "authzed/actions/go-mod-tidy@main"
with:
working_directory: "tools/analyzers"
- uses: "authzed/actions/go-generate@main"
- uses: "authzed/actions/golangci-lint@main"
- uses: "authzed/actions/go-build@main"
with:
working_directory: "tools/analyzers"
- name: "Run custom analyzers"
run: "./tools/analyzers/analyzers -skip-pkg \"github.com/authzed/spicedb/pkg/proto/dispatch/v1\" -disallowed-nil-return-type-paths \"*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchCheckResponse,*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchExpandResponse,*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchLookupResponse\" ./..."

extra-lint:
name: "Lint YAML & Markdown"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/yaml-lint@main"
- uses: "instrumenta/kubeval-action@5915e4adba5adccac07cb156b82e54c3fed74921"
with:
files: "k8s"
- uses: "authzed/actions/markdown-lint@main"
- uses: "ludeeus/action-shellcheck@1.1.0"
with:
scandir: "./hack"

codeql:
name: "Analyze with CodeQL"
runs-on: "ubuntu-latest"
permissions:
actions: "read"
contents: "read"
security-events: "write"
strategy:
fail-fast: false
matrix:
language: ["go"]
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/codeql@main"
# unit-analyzers:
# name: "Unit Test Analyzers"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - uses: "authzed/actions/go-test@main"
# with:
# working_directory: "tools/analyzers"
#
# go-lint:
# name: "Lint Go"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "actions/setup-go@v3"
# with:
# go-version: "~1.18"
# - uses: "authzed/actions/gofumpt@main"
# - uses: "authzed/actions/go-mod-tidy@main"
# - uses: "authzed/actions/go-mod-tidy@main"
# with:
# working_directory: "e2e"
# - uses: "authzed/actions/go-mod-tidy@main"
# with:
# working_directory: "tools/analyzers"
# - uses: "authzed/actions/go-generate@main"
# - uses: "authzed/actions/golangci-lint@main"
# - uses: "authzed/actions/go-build@main"
# with:
# working_directory: "tools/analyzers"
# - name: "Run custom analyzers"
# run: "./tools/analyzers/analyzers -skip-pkg \"github.com/authzed/spicedb/pkg/proto/dispatch/v1\" -disallowed-nil-return-type-paths \"*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchCheckResponse,*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchExpandResponse,*github.com/authzed/spicedb/pkg/proto/dispatch/v1.DispatchLookupResponse\" ./..."
#
# extra-lint:
# name: "Lint YAML & Markdown"
# runs-on: "ubuntu-latest"
# steps:
# - uses: "actions/checkout@v3"
# - uses: "authzed/actions/yaml-lint@main"
# - uses: "instrumenta/kubeval-action@5915e4adba5adccac07cb156b82e54c3fed74921"
# with:
# files: "k8s"
# - uses: "authzed/actions/markdown-lint@main"
# - uses: "ludeeus/action-shellcheck@1.1.0"
# with:
# scandir: "./hack"
#
# codeql:
# name: "Analyze with CodeQL"
# runs-on: "ubuntu-latest"
# permissions:
# actions: "read"
# contents: "read"
# security-events: "write"
# strategy:
# fail-fast: false
# matrix:
# language: ["go"]
# steps:
# - uses: "actions/checkout@v3"
# - uses: "authzed/actions/codeql@main"
Loading

0 comments on commit e1322d4

Please sign in to comment.