forked from go-sql-driver/mysql
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/connection-attributes
* master: (93 commits) return unsigned in database type name when necessary (go-sql-driver#1238) add an invalid DSN test case (go-sql-driver#1235) refactoring (*textRows).readRow in a more clear way (go-sql-driver#1230) use utf8mb4 instead of utf8 in TestCharset (go-sql-driver#1228) improve readability follows go-staticcheck (go-sql-driver#1227) support Is comparison on MySQLError (go-sql-driver#1210) Wording correction in README (go-sql-driver#1218) noCopy implements sync.Locker (go-sql-driver#1216) Fix readme: MaxIdle is same or less than MaxOpen (go-sql-driver#1215) Drop support of Go 1.12 (go-sql-driver#1211) Release v1.6.0 (go-sql-driver#1197) add Go 1.16 to the build matrix (go-sql-driver#1198) Implement driver.Validator interface (go-sql-driver#1174) handling decoding pem error (go-sql-driver#1192) stop rounding times (go-sql-driver#1172) improve GitHub Actions workflows (go-sql-driver#1190) Move tests from Travis to Actions (go-sql-driver#1183) Fix go vet error (go-sql-driver#1173) README: Make usage code more friendly (go-sql-driver#1170) Fix a broken link to cleartext client side plugin (go-sql-driver#1165) ...
- Loading branch information
Showing
39 changed files
with
2,706 additions
and
1,133 deletions.
There are no files selected for viewing
File renamed without changes.
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,102 @@ | ||
name: test | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
MYSQL_TEST_USER: gotest | ||
MYSQL_TEST_PASS: secret | ||
MYSQL_TEST_ADDR: 127.0.0.1:3306 | ||
MYSQL_TEST_CONCURRENT: 1 | ||
|
||
jobs: | ||
list: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: list | ||
id: set-matrix | ||
run: | | ||
import json | ||
go = [ | ||
# Keep the most recent production release at the top | ||
'1.16', | ||
# Older production releases | ||
'1.15', | ||
'1.14', | ||
'1.13', | ||
] | ||
mysql = [ | ||
'8.0', | ||
'5.7', | ||
'5.6', | ||
'mariadb-10.5', | ||
'mariadb-10.4', | ||
'mariadb-10.3', | ||
] | ||
includes = [] | ||
# Go versions compatibility check | ||
for v in go[1:]: | ||
includes.append({'os': 'ubuntu-latest', 'go': v, 'mysql': mysql[0]}) | ||
matrix = { | ||
# OS vs MySQL versions | ||
'os': [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ], | ||
'go': [ go[0] ], | ||
'mysql': mysql, | ||
'include': includes | ||
} | ||
output = json.dumps(matrix, separators=(',', ':')) | ||
print('::set-output name=matrix::{0}'.format(output)) | ||
shell: python | ||
test: | ||
needs: list | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(needs.list.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- uses: shogo82148/actions-setup-mysql@v1 | ||
with: | ||
mysql-version: ${{ matrix.mysql }} | ||
user: ${{ env.MYSQL_TEST_USER }} | ||
password: ${{ env.MYSQL_TEST_PASS }} | ||
my-cnf: | | ||
innodb_log_file_size=256MB | ||
innodb_buffer_pool_size=512MB | ||
max_allowed_packet=16MB | ||
; TestConcurrent fails if max_connections is too large | ||
max_connections=50 | ||
local_infile=1 | ||
- name: setup database | ||
run: | | ||
mysql --user 'root' --host '127.0.0.1' -e 'create database gotest;' | ||
- name: test | ||
run: | | ||
go test -v '-covermode=count' '-coverprofile=coverage.out' | ||
- name: Send coverage | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out | ||
flag-name: ${{ runner.os }}-Go-${{ matrix.go }}-DB-${{ matrix.mysql }} | ||
parallel: true | ||
|
||
# notifies that all test jobs are finished. | ||
finish: | ||
needs: test | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
parallel-finished: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.