Skip to content

Commit d52afdf

Browse files
committed
add magefiles and move what we can into the mage module
1 parent cce8420 commit d52afdf

File tree

14 files changed

+1673
-98
lines changed

14 files changed

+1673
-98
lines changed

.github/workflows/build-test.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
---
22
name: "Build & Test"
3-
on: # yamllint disable-line rule:truthy
3+
on: # yamllint disable-line rule:truthy
44
push:
55
branches:
66
- "main"
77
pull_request:
88
branches:
99
- "*"
10+
env:
11+
GO_VERSION: "~1.20.7"
1012
jobs:
1113
unit:
1214
name: "Unit"
1315
runs-on: "ubuntu-latest"
1416
steps:
1517
- uses: "actions/checkout@v3"
16-
- uses: "actions/setup-go@v3"
18+
- uses: "authzed/actions/setup-go@main"
1719
with:
18-
go-version: "~1.20"
19-
- uses: "authzed/actions/go-test@main"
20+
go-version: "${{ env.GO_VERSION }}"
21+
- uses: "magefile/mage-action@v2"
22+
with:
23+
version: "latest"
24+
args: "test:unit"
25+
integration:
26+
name: "integration"
27+
runs-on: "ubuntu-latest"
28+
steps:
29+
- uses: "actions/checkout@v3"
30+
- uses: "authzed/actions/setup-go@main"
31+
with:
32+
go-version: "${{ env.GO_VERSION }}"
33+
- uses: "magefile/mage-action@v2"
34+
with:
35+
version: "latest"
36+
args: "test:integration"

.github/workflows/lint.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,34 @@ on: # yamllint disable-line rule:truthy
77
- "main"
88
pull_request:
99
branches: ["*"]
10+
env:
11+
GO_VERSION: "~1.20.7"
1012
jobs:
1113
go-lint:
1214
name: "Lint Go"
1315
runs-on: "ubuntu-latest"
1416
steps:
1517
- uses: "actions/checkout@v3"
16-
- uses: "actions/setup-go@v3"
18+
- uses: "authzed/actions/setup-go@main"
1719
with:
18-
go-version: "~1.20"
19-
- uses: "authzed/actions/gofumpt@main"
20-
- uses: "authzed/actions/go-generate@main"
20+
go-version: "${{ env.GO_VERSION }}"
21+
- uses: "magefile/mage-action@v2"
22+
with:
23+
version: "latest"
24+
args: "lint:go"
25+
# golangci-lint is kept out of the module for now, since it needs to be
26+
# run from root and would pollute the module's dependencies
2127
- uses: "authzed/actions/golangci-lint@main"
2228

2329
extra-lint:
2430
name: "Lint YAML & Markdown"
2531
runs-on: "ubuntu-latest"
2632
steps:
2733
- uses: "actions/checkout@v3"
28-
- uses: "authzed/actions/yaml-lint@main"
29-
- uses: "authzed/actions/markdown-lint@main"
34+
- uses: "authzed/actions/setup-go@main"
35+
with:
36+
go-version: "${{ env.GO_VERSION }}"
37+
- uses: "magefile/mage-action@v2"
38+
with:
39+
version: "latest"
40+
args: "lint:extra"

go.mod

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module github.com/authzed/controller-idioms
22

3-
go 1.19
3+
go 1.20
44

55
require (
6-
github.com/cespare/xxhash/v2 v2.1.2
6+
github.com/cespare/xxhash/v2 v2.2.0
77
github.com/davecgh/go-spew v1.1.1
88
github.com/fsnotify/fsnotify v1.6.0
9-
github.com/go-logr/logr v1.2.3
10-
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
9+
github.com/go-logr/logr v1.2.4
10+
github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0
1111
github.com/prometheus/client_golang v1.14.0
12-
github.com/stretchr/testify v1.8.1
13-
golang.org/x/exp v0.0.0-20220823124025-807a23277127
14-
golang.org/x/sync v0.1.0
12+
github.com/stretchr/testify v1.8.4
13+
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
14+
golang.org/x/sync v0.3.0
1515
k8s.io/api v0.27.2
1616
k8s.io/apiextensions-apiserver v0.27.2
1717
k8s.io/apimachinery v0.27.2
@@ -21,7 +21,6 @@ require (
2121
k8s.io/controller-manager v0.27.2
2222
k8s.io/klog/v2 v2.90.1
2323
k8s.io/utils v0.0.0-20230209194617-a36077c30491
24-
mvdan.cc/gofumpt v0.3.1
2524
)
2625

2726
require (
@@ -47,11 +46,12 @@ require (
4746
github.com/google/gnostic v0.5.7-v3refs // indirect
4847
github.com/google/go-cmp v0.5.9 // indirect
4948
github.com/google/gofuzz v1.1.0 // indirect
49+
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
5050
github.com/google/uuid v1.3.0 // indirect
5151
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
5252
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
5353
github.com/imdario/mergo v0.3.12 // indirect
54-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
54+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5555
github.com/josharian/intern v1.0.0 // indirect
5656
github.com/json-iterator/go v1.1.12 // indirect
5757
github.com/mailru/easyjson v0.7.7 // indirect
@@ -65,39 +65,29 @@ require (
6565
github.com/prometheus/client_model v0.3.0 // indirect
6666
github.com/prometheus/common v0.37.0 // indirect
6767
github.com/prometheus/procfs v0.8.0 // indirect
68-
github.com/spf13/cobra v1.6.0 // indirect
68+
github.com/sirupsen/logrus v1.9.3 // indirect
69+
github.com/spf13/cobra v1.7.0 // indirect
6970
github.com/spf13/pflag v1.0.5 // indirect
7071
github.com/stoewer/go-strcase v1.2.0 // indirect
7172
github.com/stretchr/objx v0.5.0 // indirect
7273
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
7374
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
7475
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
75-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
76-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect
77-
go.opentelemetry.io/otel v1.10.0 // indirect
78-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
79-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
80-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
81-
go.opentelemetry.io/otel/metric v0.31.0 // indirect
82-
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
83-
go.opentelemetry.io/otel/trace v1.10.0 // indirect
84-
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
85-
go.uber.org/atomic v1.7.0 // indirect
86-
go.uber.org/multierr v1.6.0 // indirect
76+
go.uber.org/atomic v1.11.0 // indirect
77+
go.uber.org/multierr v1.11.0 // indirect
8778
go.uber.org/zap v1.24.0 // indirect
88-
golang.org/x/crypto v0.1.0 // indirect
89-
golang.org/x/mod v0.9.0 // indirect
90-
golang.org/x/net v0.8.0 // indirect
91-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
92-
golang.org/x/sys v0.6.0 // indirect
93-
golang.org/x/term v0.6.0 // indirect
94-
golang.org/x/text v0.8.0 // indirect
79+
golang.org/x/crypto v0.12.0 // indirect
80+
golang.org/x/net v0.14.0 // indirect
81+
golang.org/x/oauth2 v0.7.0 // indirect
82+
golang.org/x/sys v0.11.0 // indirect
83+
golang.org/x/term v0.11.0 // indirect
84+
golang.org/x/text v0.12.0 // indirect
9585
golang.org/x/time v0.3.0 // indirect
96-
golang.org/x/tools v0.7.0 // indirect
86+
golang.org/x/tools v0.12.0 // indirect
9787
google.golang.org/appengine v1.6.7 // indirect
98-
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
99-
google.golang.org/grpc v1.51.0 // indirect
100-
google.golang.org/protobuf v1.28.1 // indirect
88+
google.golang.org/genproto v0.0.0-20230323212658-478b75c54725 // indirect
89+
google.golang.org/grpc v1.54.0 // indirect
90+
google.golang.org/protobuf v1.31.0 // indirect
10191
gopkg.in/inf.v0 v0.9.1 // indirect
10292
gopkg.in/yaml.v2 v2.4.0 // indirect
10393
gopkg.in/yaml.v3 v3.0.1 // indirect
@@ -107,3 +97,18 @@ require (
10797
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
10898
sigs.k8s.io/yaml v1.3.0 // indirect
10999
)
100+
101+
require (
102+
cloud.google.com/go/compute v1.19.1 // indirect
103+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect
104+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect
105+
go.opentelemetry.io/otel v1.10.0 // indirect
106+
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
107+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect
108+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect
109+
go.opentelemetry.io/otel/metric v0.31.0 // indirect
110+
go.opentelemetry.io/otel/sdk v1.10.0 // indirect
111+
go.opentelemetry.io/otel/trace v1.10.0 // indirect
112+
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
113+
golang.org/x/mod v0.12.0 // indirect
114+
)

0 commit comments

Comments
 (0)