Skip to content

Commit 27750ce

Browse files
committed
remove swagger generation
1 parent fe8df9f commit 27750ce

File tree

10 files changed

+26
-3407
lines changed

10 files changed

+26
-3407
lines changed

.github/workflows/lint.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,31 @@ on: # yamllint disable-line rule:truthy
1111
types:
1212
- "checks_requested"
1313
jobs:
14-
go-lint:
15-
name: "Lint Go"
14+
lint:
1615
runs-on: "ubuntu-latest"
1716
steps:
1817
- uses: "actions/checkout@v4"
1918
- uses: "authzed/actions/setup-go@main"
20-
- name: "Lint Go"
21-
run: "go run magefile.go lint:go"
22-
- name: "Go Mod Tidy"
19+
- name: "Lint everything and check for tidy dependencies"
20+
run: "go run magefile.go lint:all && go run magefile.go deps:tidy"
21+
- name: "Check no diff"
2322
uses: "chainguard-dev/actions/nodiff@main"
2423
with:
2524
path: ""
26-
fixup-command: "go run magefile.go deps:tidy"
25+
fixup-command: "go run magefile.go lint:all && go run magefile.go deps:tidy"
2726
protobuf:
2827
name: "Generate Protobufs"
2928
runs-on: "ubuntu-latest"
3029
steps:
3130
- uses: "actions/checkout@v4"
3231
- uses: "authzed/actions/setup-go@main"
33-
- uses: "chainguard-dev/actions/nodiff@main"
32+
- name: "Generate Protos"
33+
run: "go run magefile.go gen:all"
34+
- name: "Check no diff"
35+
uses: "chainguard-dev/actions/nodiff@main"
3436
with:
3537
path: ""
36-
fixup-command: "go run magefile.go gen:proto"
37-
extra-lint:
38-
name: "Lint YAML"
39-
runs-on: "ubuntu-latest"
40-
steps:
41-
- uses: "actions/checkout@v4"
42-
- uses: "authzed/actions/setup-go@main"
43-
- name: "Lint Go"
44-
run: "go run magefile.go lint:extra"
38+
fixup-command: "go run magefile.go gen:all"
4539
codeql:
4640
name: "Analyze with CodeQL"
4741
runs-on: "ubuntu-latest"

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- "checks_requested"
1414
jobs:
1515
tests:
16-
name: "Unit and Integration Tests"
16+
name: "Tests"
1717
runs-on: "ubuntu-latest"
1818
steps:
1919
- uses: "actions/checkout@v4"
@@ -22,4 +22,4 @@ jobs:
2222
with:
2323
version: "latest"
2424
- name: "Run tests"
25-
run: "go test ./..."
25+
run: "go run magefile.go test:all"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/authzed/authzed-go
22

33
go 1.23.0
44

5-
toolchain go1.24.1
5+
toolchain go1.24.4
66

77
require (
88
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250425153114-8976f5be98c1.1

magefiles/buf.gen.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,3 @@ plugins:
3131
]
3232
out: "../proto"
3333
opt: "paths=source_relative"
34-
# Openapi V2
35-
- out: "../proto"
36-
local:
37-
[
38-
"go",
39-
"run",
40-
"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2",
41-
]
42-
strategy: "all"
43-
opt: "allow_merge=true"

magefiles/lint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func (l Lint) All() error {
1818
return nil
1919
}
2020

21-
// Extra lits everything that's not code
21+
// Extra lints everything that's not code
2222
func (l Lint) Extra() error {
2323
mg.Deps(l.Yaml)
2424
return nil

magefiles/test.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ type Test mg.Namespace
1212

1313
// All runs all test suites
1414
func (t Test) All() error {
15-
mg.Deps(t.Integration)
15+
mg.Deps(t.Integration, t.Unit)
1616
return nil
1717
}
1818

19-
// Integration runs the unit tests
20-
func (Test) Integration() error {
19+
// Unit runs the unit tests
20+
func (t Test) Unit() error {
2121
fmt.Println("running unit tests")
22+
return goTest("./...", "-race", "-count", "1", "-timeout", "10m")
23+
}
24+
25+
// Integration runs the integration tests
26+
func (Test) Integration() error {
27+
fmt.Println("running integration tests")
2228
return goTest("./...", "-tags", "integration", "-timeout", "10m")
2329
}

magefiles/tools.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
_ "github.com/envoyproxy/protoc-gen-validate"
99
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
1010
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
11-
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
1211
_ "github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto"
1312
_ "golang.org/x/vuln/cmd/govulncheck"
1413
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"

0 commit comments

Comments
 (0)