Skip to content

Commit

Permalink
build(CLI): Run test workflow only for CLI releases (#683)
Browse files Browse the repository at this point in the history
* Chore: Run CLI tests workflow only for CLI releases

* Add cli client path

* Try fixing goimports error

* Add fixed goimports version for CLI as well
  • Loading branch information
bikmazefe authored Sep 17, 2024
1 parent 9dcdcab commit 7d43167
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-cli.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Currently this does not contain any tests, only a license check
# Once we add tests, we should add a step here to run them
name: Run CLI Tests
on: [push]
on:
push:
paths:
- openapi-generator/cli_lang.yaml
- clients/cli/cmd/internal/*
jobs:
test:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ruby:
openapi-generator-cli generate -i tmp/compiled.yaml -g ruby -o clients/ruby -c ./openapi-generator/ruby_lang.yaml
go:
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o clients/go -c ./openapi-generator/go_lang.yaml --global-property apiTests=false,modelTests=false
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/goimports@v0.24.0
goimports -w clients/go
cd clients/go && go mod tidy
typescript:
Expand All @@ -48,6 +48,6 @@ cli:
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o tmp/cli -c ./openapi-generator/cli_lang.yaml -e handlebars
cp tmp/cli/api_* clients/cli/cmd/
cp tmp/cli/README.md clients/cli/
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/goimports@v0.24.0
goimports -w clients/cli
cd clients/cli && go mod tidy

0 comments on commit 7d43167

Please sign in to comment.