Skip to content

Commit

Permalink
fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hale committed Dec 17, 2023
1 parent 38468aa commit 1571409
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 32 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ jobs:
run: |
echo "GOPATH=/home/runner/go" >> "$GITHUB_ENV"
echo "PATH=$PATH:/home/runner/go/bin" >> "$GITHUB_ENV"
- name: Clean out go cache
run: go clean -cache && go clean -modcache
- name: Checkout codebase
uses: actions/checkout@v4
- name: Install goa
run: go install goa.design/goa/v3/cmd/goa@v3
- name: Generate Server, CLI and Service definitions
run: goa gen github.com/t-hale/stox/design
run: bazel build //:goagen --action_env=GOCACHE=${HOME}/.cache --action_env=GOPATH=${GOPATH} --spawn_strategy=local
- name: Run gazelle to generate BUILD files
run: bazel run //:gazelle
run: bazel run //:gazelle --action_env=GOCACHE=${HOME}/.cache --action_env=GOPATH=${GOPATH}
- name: Build the stox service
run: bazel build :stox
run: bazel build --verbose_failures :stox --action_env=GOCACHE=${HOME}/.cache --action_env=GOPATH=${GOPATH}
- name: Run unit tests
run: bazel run :stox_test
run: bazel run :stox_test --action_env=GOCACHE=${HOME}/.cache --action_env=GOPATH=${GOPATH}
37 changes: 10 additions & 27 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,16 @@ go_library(
],
)

#genrule(
# name = "goagen",
# # srcs = [
# # "//design:goafiles",
# # ],
# outs = [
# "gen/http/cli/server/cli.go",
# "gen/http/openapi.json",
# "gen/http/openapi.yaml",
# "gen/http/openapi3.json",
# "gen/http/openapi3.yaml",
# "gen/http/stox/client/cli.go",
# "gen/http/stox/client/client.go",
# "gen/http/stox/client/encode_decode.go",
# "gen/http/stox/client/paths.go",
# "gen/http/stox/client/types.go",
# "gen/http/stox/server/encode_decode.go",
# "gen/http/stox/server/paths.go",
# "gen/http/stox/server/server.go",
# "gen/http/stox/server/types.go",
# "gen/log/logger.go",
# "gen/stox/client.go",
# "gen/stox/endpoints.go",
# "gen/stox/service.go",
# ],
# cmd = "goa gen github.com/t-hale/stox/design",
#)
genrule(
name = "goagen",
srcs = [
"//design:goafiles",
],
outs = [
"out.txt",
],
cmd = "goa gen github.com/t-hale/stox/design > $@",
)

gazelle(
name = "gazelle-update-repos",
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
Expand Down

0 comments on commit 1571409

Please sign in to comment.