Skip to content

FOR_UPDATE() virtual func #17

FOR_UPDATE() virtual func

FOR_UPDATE() virtual func #17

Workflow file for this run

# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-go
name: Test
on:
pull_request:
types: [opened, reopened, edited]
push:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:9.6
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:18
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# sqlserver:
# image: mcr.microsoft.com/mssql/server:2025-latest
# env:
# ACCEPT_EULA: "Y"
# MSSQL_SA_PASSWORD: Password123
# ports:
# - 1433:1433
# options: >-
# --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password123 -Q 'SELECT 1'"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 10
name: Run tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.sum
- name: Go version
run: go version
- name: Go test
run: go test -count 1 -timeout 30s -cover ./...