56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: test mysql8
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
env:
|
|
GOPROXY: https://goproxy.io,direct
|
|
GOPATH: /go_path
|
|
GOCACHE: /go_cache
|
|
|
|
jobs:
|
|
lint:
|
|
name: test mysql8
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# - name: cache go path
|
|
# id: cache-go-path
|
|
# uses: https://github.com/actions/cache@v3
|
|
# with:
|
|
# path: /go_path
|
|
# key: go_path-${{ github.repository }}-${{ github.ref_name }}
|
|
# restore-keys: |
|
|
# go_path-${{ github.repository }}-
|
|
# go_path-
|
|
# - name: cache go cache
|
|
# id: cache-go-cache
|
|
# uses: https://github.com/actions/cache@v3
|
|
# with:
|
|
# path: /go_cache
|
|
# key: go_cache-${{ github.repository }}-${{ github.ref_name }}
|
|
# restore-keys: |
|
|
# go_cache-${{ github.repository }}-
|
|
# go_cache-
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.20
|
|
- uses: https://github.com/actions/checkout@v3
|
|
- name: test mysql8
|
|
env:
|
|
TEST_MYSQL_HOST: mysql8
|
|
TEST_MYSQL_CHARSET: utf8mb4
|
|
TEST_MYSQL_DBNAME: xorm_test
|
|
TEST_MYSQL_USERNAME: root
|
|
TEST_MYSQL_PASSWORD:
|
|
run: TEST_CACHE_ENABLE=true make test-mysql
|
|
|
|
services:
|
|
mysql8:
|
|
image: mysql:8.0
|
|
env:
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
MYSQL_DATABASE: xorm_test
|
|
ports:
|
|
- 3306:3306 |