-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'github/main' into fix/subtract-previous…
…-usage
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 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,66 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
# TODO: coverage | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: | ||
- "1.19" | ||
- "1.20" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- run: make test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.19" | ||
# https://github.com/golangci/golangci-lint-action/issues/244 | ||
# without `cache: false`, the action might intermittently fail | ||
cache: false | ||
|
||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.52.2 | ||
only-new-issues: true | ||
args: > | ||
--timeout=5m | ||
--max-issues-per-linter=0 | ||
--max-same-issues=0 | ||
--uniq-by-line=false | ||
verify-codegen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.19" | ||
|
||
- run: | | ||
make generate -B | ||
git diff --exit-code && exit 0 | ||
echo "Codegen is not up to date. Please run 'make generate' and commit the changes." >&2 | ||
exit 1 |