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

CI: Update nolintlint config #991

Merged
merged 5 commits into from
Feb 17, 2025
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
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: runTestsAndLinters
on: [push, pull_request]

permissions:
contents: read
# Write is needed for golangci-lint annotations
checks: write

jobs:
test:
strategy:
matrix:
go: [ "1.23", "1.22" ]
go: [ "1.24", "1.23", "1.22" ]
os: [ ubuntu-24.04, ubuntu-22.04 ]
name: Tests Go ${{ matrix.go }} on ${{ matrix.os }} # This name is used in main branch protection rules
runs-on: ${{ matrix.os }}
Expand All @@ -17,11 +22,11 @@ jobs:
echo -n "mysqldump -V: " ; mysqldump -V

echo -e '[mysqld]\nserver-id=1\nlog-bin=mysql\nbinlog-format=row\ngtid-mode=ON\nenforce_gtid_consistency=ON\n' | sudo tee /etc/mysql/conf.d/replication.cnf

# bind to :: for dual-stack listening
sudo sed -i 's/bind-address.*= 127.0.0.1/bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf
sudo sed -i 's/mysqlx-bind-address.*= 127.0.0.1/mysqlx-bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf

sudo service mysql start

# apply this for mysql5 & mysql8 compatibility
Expand Down Expand Up @@ -78,7 +83,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version: stable
- name: Run tests
run: |
# separate test to avoid RESET MASTER conflict
Expand All @@ -91,6 +96,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand All @@ -113,7 +121,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version: stable

- name: Build on ${{ matrix.os }}/${{ matrix.arch }}
run: GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build ./...
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
linters-settings:
nolintlint:
allow-unused: false
allow-leading-space: false
require-specific: true

govet:
Expand Down
Loading