Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(actions): check uncomitted go source code changes #292

Merged
merged 2 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/verify-go-src.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Verify Go client

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
verify-go:
name: Verify go client source code is up to date
strategy:
matrix:
os: [ubuntu-latest]
go_version: [1.14.x]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest is 1.15, do we want to use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to do it, but maybe in that case we should also add it to our Test action - https://github.com/netlify/open-api/blob/master/.github/workflows/test.yml#L34?

runs-on: ${{ matrix.os }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/[email protected]
with:
go-version: ${{ matrix.go_version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: make all
- name: Check for changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the go client source files detected"
else
echo "Changes to the go client source files detected, please run 'make all' and push your changes"
exit 1
fi
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ vendor
yarn.lock
dist
.vscode
.gobincache
.gobincache
swagger_flat.json
swagger_go.json