Skip to content

Commit 1e398c8

Browse files
committed
remove swagger generation
1 parent fe8df9f commit 1e398c8

9 files changed

Lines changed: 37 additions & 32 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,35 @@ 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+
with:
20+
go-version-file: "go.mod"
21+
- name: "Lint everything and check for tidy dependencies"
22+
run: "go run magefile.go lint:all && go run magefile.go deps:tidy"
23+
- name: "Check no diff"
2324
uses: "chainguard-dev/actions/nodiff@main"
2425
with:
2526
path: ""
26-
fixup-command: "go run magefile.go deps:tidy"
27+
fixup-command: "go run magefile.go lint:all && go run magefile.go deps:tidy"
2728
protobuf:
2829
name: "Generate Protobufs"
2930
runs-on: "ubuntu-latest"
3031
steps:
3132
- uses: "actions/checkout@v4"
3233
- uses: "authzed/actions/setup-go@main"
33-
- uses: "chainguard-dev/actions/nodiff@main"
34+
with:
35+
go-version-file: "go.mod"
36+
- name: "Generate Protos"
37+
run: "go run magefile.go gen:all"
38+
- name: "Check no diff"
39+
uses: "chainguard-dev/actions/nodiff@main"
3440
with:
3541
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"
42+
fixup-command: "go run magefile.go gen:all"
4543
codeql:
4644
name: "Analyze with CodeQL"
4745
runs-on: "ubuntu-latest"

.github/workflows/test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ on:
1313
- "checks_requested"
1414
jobs:
1515
tests:
16-
name: "Unit and Integration Tests"
16+
name: "Tests"
1717
runs-on: "ubuntu-latest"
18+
timeout-minutes: 30
1819
steps:
1920
- uses: "actions/checkout@v4"
2021
- uses: "actions/setup-go@v5"
22+
with:
23+
go-version-file: "go.mod"
2124
- uses: "authzed/action-spicedb@v1"
2225
with:
2326
version: "latest"
2427
- name: "Run tests"
25-
run: "go test ./..."
28+
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/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: 10 additions & 4 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("./...", "-tags", "integration", "-timeout", "10m")
22+
return goTest("./...", "-race", "-count", "1", "-timeout", "20m")
23+
}
24+
25+
// Integration runs the integration tests
26+
func (Test) Integration() error {
27+
fmt.Println("running integration tests")
28+
return goTest("./...", "-v", "-tags", "integration", "-timeout", "1m")
2329
}

proto/authzed/api/validation_test/relationships_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build !integration
2+
13
package validation_test
24

35
import (

proto/authzed/api/validation_test/updates_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build !integration
2+
13
package validation_test
24

35
import (

proto/proto.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

v1/client_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build integration
2+
13
package authzed_test
24

35
import (

0 commit comments

Comments
 (0)