Skip to content

Update go.yml

Update go.yml #5

Workflow file for this run

name: Go
on:
push:
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*
jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 8
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Go 1.21.6
uses: actions/setup-go@v2
with:
go-version: 1.21.6
- name: Check
run: make check
- name: Unit test
run: make test WITH_RACE=1
- uses: codecov/codecov-action@v1
integration-test-mysql-5735:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:5.7.35
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.21.6
uses: actions/setup-go@v2
with:
go-version: 1.21.6
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh install.sh
- name: Integration test
run: make integration_test
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
integration-test-mysql-8026:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:8.0.26
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.21.6
uses: actions/setup-go@v2
with:
go-version: 1.21.6
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh install.sh
- name: Integration test
run: make integration_test
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
integration-test-mysql-8022:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:8.0.22
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.21.6
uses: actions/setup-go@v2
with:
go-version: 1.21.6
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh install.sh
- name: Integration test
run: make integration_test
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3