11name : runTestsAndLinters
22on : [push, pull_request]
33
4+ permissions :
5+ contents : read
6+ # Write is needed for golangci-lint annotations
7+ checks : write
8+
49jobs :
510 test :
611 strategy :
712 matrix :
8- go : [ "1.23", "1.22" ]
9- os : [ ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ]
13+ go : [ "1.24", "1. 23", "1.22" ]
14+ os : [ ubuntu-24.04, ubuntu-22.04 ]
1015 name : Tests Go ${{ matrix.go }} on ${{ matrix.os }} # This name is used in main branch protection rules
1116 runs-on : ${{ matrix.os }}
1217
@@ -17,11 +22,11 @@ jobs:
1722 echo -n "mysqldump -V: " ; mysqldump -V
1823
1924 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
20-
25+
2126 # bind to :: for dual-stack listening
2227 sudo sed -i 's/bind-address.*= 127.0.0.1/bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf
2328 sudo sed -i 's/mysqlx-bind-address.*= 127.0.0.1/mysqlx-bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf
24-
29+
2530 sudo service mysql start
2631
2732 # apply this for mysql5 & mysql8 compatibility
7883 - name : Install Go
7984 uses : actions/setup-go@v5
8085 with :
81- go-version : " 1.23 "
86+ go-version : stable
8287 - name : Run tests
8388 run : |
8489 # separate test to avoid RESET MASTER conflict
9196 runs-on : ubuntu-latest
9297 steps :
9398 - uses : actions/checkout@v4
99+ - uses : actions/setup-go@v5
100+ with :
101+ go-version : stable
94102 - name : golangci-lint
95103 uses : golangci/golangci-lint-action@v6
96104 with :
@@ -113,7 +121,7 @@ jobs:
113121 - name : Install Go
114122 uses : actions/setup-go@v5
115123 with :
116- go-version : " 1.23 "
117-
124+ go-version : stable
125+
118126 - name : Build on ${{ matrix.os }}/${{ matrix.arch }}
119127 run : GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build ./...
0 commit comments