Skip to content

Commit

Permalink
ci: add license check to ensure we only depend on 'notice' licenses (#…
Browse files Browse the repository at this point in the history
…191)

* ci: add license check to ensure we only depend on 'notice' licenses

* Fix name.

* Remove copypasta x check.

* Add `go-licenses` to `tools.go`.
  • Loading branch information
sbruens authored Jul 1, 2024
1 parent ace37b1 commit e8c9080
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ jobs:
- name: Build
run: go build -v ./...

- name: Check licenses
# We allow only "notice" type of licenses.
run: go run github.com/google/go-licenses check --ignore=golang.org/x --allowed_licenses=Apache-2.0,Apache-3,BSD-3-Clause,BSD-4-Clause,CC0-1.0,ISC,MIT ./...

- name: Test
run: go test -race -benchmem -bench=. ./... -benchtime=100ms
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/Jigsaw-Code/outline-ss-server
require (
github.com/Jigsaw-Code/outline-sdk v0.0.14
github.com/go-task/task/v3 v3.34.1
github.com/google/go-licenses v1.6.0
github.com/goreleaser/goreleaser v1.18.2
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/oschwald/geoip2-golang v1.8.0
Expand Down Expand Up @@ -116,6 +117,7 @@ require (
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand All @@ -138,6 +140,7 @@ require (
github.com/google/go-github/v50 v50.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/ko v0.13.0 // indirect
github.com/google/licenseclassifier v0.0.0-20210722185704-3043a050f148 // indirect
github.com/google/s2a-go v0.1.2 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/google/uuid v1.3.0 // indirect
Expand Down Expand Up @@ -193,6 +196,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/oschwald/maxminddb-golang v1.10.0 // indirect
github.com/otiai10/copy v1.6.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand Down Expand Up @@ -220,6 +224,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/theupdateframework/go-tuf v0.5.2 // indirect
Expand Down Expand Up @@ -255,8 +260,11 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/mail.v2 v2.3.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.90.0 // indirect
mvdan.cc/sh/v3 v3.7.0 // indirect
sigs.k8s.io/kind v0.17.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit e8c9080

Please sign in to comment.