Skip to content

Commit

Permalink
Use go-version-file in setup-go
Browse files Browse the repository at this point in the history
  • Loading branch information
adracus committed Mar 27, 2023
1 parent 89907c7 commit 86255ca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/check-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ name: Check Codegen
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'docs/**'
- '**/*.md'

jobs:
check-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Run make generate
run: make generate
- name: Compare the expected and actual generated/* directories
run: |
if [ "$(git diff --ignore-space-at-eol client-go/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. Consider running 'make generate'."
echo "See status below:"
git diff
exit 1
fi
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run make generate
run: make generate
- name: Compare the expected and actual generated/* directories
run: |
if [ "$(git diff --ignore-space-at-eol client-go/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. Consider running 'make generate'."
echo "See status below:"
git diff
exit 1
fi
20 changes: 10 additions & 10 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Lint Golang Codebase
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'docs/**'
- '**/*.md'
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'docs/**'
- '**/*.md'

jobs:
checks:
name: run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- run: make test
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- run: make test

0 comments on commit 86255ca

Please sign in to comment.