Skip to content

Update Go and Workflows version #15

Update Go and Workflows version

Update Go and Workflows version #15

Workflow file for this run

name: test
on:
push:
branches: main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mysql: ["5.6", "5.7", "8.0"]
services:
db:
image: mysql:${{ matrix.mysql }}
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: sakila
MYSQL_USER: user
MYSQL_PASSWORD: password
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: prepare test
run: mysql -uroot -proot -h127.0.0.1 -P3306 sakila < ./testdata/schema/sakila.sql
- name: test with MySQL ${{ matrix.mysql }}
run: go test -v -race ./...
env:
TEST_DSN: "root:root@tcp(127.0.0.1:3306)/sakila?parseTime=true"