Skip to content

Commit

Permalink
ci: update go.yml to build examples (#115)
Browse files Browse the repository at this point in the history
This PR updates `go.yml` to make sure examples can be built
successfully.
To address the build failures of two examples, this PR also updates
`go.mod` files.
In addition, this PR lists the directories for building and testing so
we don't need to manually list all directories.
  • Loading branch information
cuixq authored Dec 5, 2024
1 parent 1ee2cd4 commit 9d051cd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ jobs:
with:
go-version: stable

- name: Run tests in maven
working-directory: ./util/maven
run: go test ./...
- name: Build examples
working-directory: examples/go/
run: find . -name 'go.mod' -execdir go build \;

- name: Run tests in resolve
working-directory: ./util/resolve
run: go test ./...

- name: Run tests in semver
working-directory: ./util/semver
run: go test ./...
- name: Run util tests
working-directory: util/
run: find . -name 'go.mod' -execdir go test ./... \;
2 changes: 1 addition & 1 deletion examples/go/maven_parse_resolve/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
deps.dev/api/v3 v3.0.0-20240311054650-e1e6a3d70fb7
deps.dev/util/maven v0.0.0-20240508074152-8a0b6d3a5b11
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494
deps.dev/util/resolve v0.0.0-20240611045547-af20eef0f1eb
google.golang.org/grpc v1.56.3
)
Expand Down
4 changes: 2 additions & 2 deletions examples/go/maven_parse_resolve/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
deps.dev/api/v3 v3.0.0-20240311054650-e1e6a3d70fb7 h1:dleK4xoNCfxlfknQNPR1DmSdVErIAWlEzxtTImCqWXI=
deps.dev/api/v3 v3.0.0-20240311054650-e1e6a3d70fb7/go.mod h1:k3RHZwAw7ijqoXmVDvcO7ikeTwTC4jtmhCDathV+IKE=
deps.dev/util/maven v0.0.0-20240508074152-8a0b6d3a5b11 h1:Pj5eDqVZUx/CdWEAef6sb/xCOI/wwg7G+saoYMHGOW8=
deps.dev/util/maven v0.0.0-20240508074152-8a0b6d3a5b11/go.mod h1:SBW3EribdkZYk6zxi5oVn/ZECvi4ixb7EGgEWfSimNk=
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494 h1:owERvoPo5Ma5nMlBFXRNji18xF0DpvzAQd+TRv1CVBw=
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494/go.mod h1:SBW3EribdkZYk6zxi5oVn/ZECvi4ixb7EGgEWfSimNk=
deps.dev/util/resolve v0.0.0-20240611045547-af20eef0f1eb h1:BE7E7Ekn8OibNRzYeTLM7vsRplskWxjj9vNumfio6Vw=
deps.dev/util/resolve v0.0.0-20240611045547-af20eef0f1eb/go.mod h1:XXi6yRYqhtxw5DvGX/mbG6fHSLn8OgoPowNd8EAxDgk=
deps.dev/util/semver v0.0.0-20240109040450-1e316b822bc4 h1:RDmJe2F67jB7ovkbd28Pdpw3vEYUi2tWV5RlOHlxByk=
Expand Down
2 changes: 1 addition & 1 deletion examples/go/resolve/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
)

require (
deps.dev/util/maven v0.0.0-20240322043601-ff53416fec6a // indirect
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494 // indirect
deps.dev/util/semver v0.0.0-20240109040450-1e316b822bc4 // indirect
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.24.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions examples/go/resolve/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
deps.dev/api/v3 v3.0.0-20240311054650-e1e6a3d70fb7 h1:dleK4xoNCfxlfknQNPR1DmSdVErIAWlEzxtTImCqWXI=
deps.dev/api/v3 v3.0.0-20240311054650-e1e6a3d70fb7/go.mod h1:k3RHZwAw7ijqoXmVDvcO7ikeTwTC4jtmhCDathV+IKE=
deps.dev/util/maven v0.0.0-20240322043601-ff53416fec6a h1:4WKIvv/Ogb2QKl1pTby5VHuiwZy6UbHj1R21cGqzLUc=
deps.dev/util/maven v0.0.0-20240322043601-ff53416fec6a/go.mod h1:SBW3EribdkZYk6zxi5oVn/ZECvi4ixb7EGgEWfSimNk=
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494 h1:owERvoPo5Ma5nMlBFXRNji18xF0DpvzAQd+TRv1CVBw=
deps.dev/util/maven v0.0.0-20241203055422-1ee2cd4be494/go.mod h1:SBW3EribdkZYk6zxi5oVn/ZECvi4ixb7EGgEWfSimNk=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
Expand Down

0 comments on commit 9d051cd

Please sign in to comment.