-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* copy gloo repo's version and see what happens * add make target and ci bash script * install goimports * goimports with correct path * make install-go-tools generated-code * add _output to .gitignore * why is '?? _output/' still in 'git status --porcelain' * do we need protoc? * whoops * why is protoc command still there? * what did that cache action do anyway? * push again * test goimports * test gofmt * hmmm... * test go mod tidy * all good * the internet tells me this improves execution time * pin protobuf v1.3.5 * make install-go-tools generated-code * undo protobuf replace and just pull in that version * use cancel-workflow-action correctly for basic usage * upgrade styfle/cancel-workflow-action version
- Loading branch information
Showing
6 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CI | ||
on: pull_request | ||
jobs: | ||
codegen: | ||
name: codegen check | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Cancel Previous Actions | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Generate Code | ||
run: | | ||
./ci/check-code-and-docs-gen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
vendor/ | ||
_output | ||
tmp/_output/ | ||
target/ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [ ! -f .gitignore ]; then | ||
echo "_output" > .gitignore | ||
fi | ||
|
||
make install-go-tools | ||
|
||
set +e | ||
|
||
make generated-code -B > /dev/null | ||
if [[ $? -ne 0 ]]; then | ||
echo "Code generation failed" | ||
exit 1; | ||
fi | ||
if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then | ||
echo "Generating code produced a non-empty diff" | ||
echo "Try running 'make install-go-tools generated-code -B' then re-pushing." | ||
git status --porcelain | ||
git diff | cat | ||
exit 1; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters