Skip to content
New issue

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

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

Already on GitHub? # to your account

ci: validate multiple version builds and use golangci-lint-action #1250

Merged
merged 2 commits into from
Jul 14, 2024
Merged
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
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,35 @@ on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21', '1.22' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: make build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Check license header
run: docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 check
- name: Run golangci-lint
run: make lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.51.2
Comment on lines +43 to +45
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? We still provide the Makefile target. This unaligned may silently cause CI logic and dev logic different ..

Both download binaries so that time consumption should be similiar.

Copy link
Member Author

Choose a reason for hiding this comment

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

golangci/golangci-lint-action can report lint result to the ci summary.

When we update the golangci-lint, we must update the workflow and makefile files to keep same version.


integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.20', '1.21.0', '1.22.0']
go-version: [ '1.20', '1.21', '1.22' ]
steps:
- uses: actions/checkout@v3
- name: clean docker cache
Expand Down
Loading