Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix-decimal

fix-decimal #29

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
postgres:
name: Test PostgreSQL
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
postgres-version: ["postgres:16", "postgres:15"]
services:
postgres:
image: ${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dbx_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- run: go mod verify
- run: go build -v ./...
- run: go test -v ./postgresql/...
mysql:
name: Test MySQL
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
mysql-version: ["mysql:8.0"]
services:
mysql:
image: ${{ matrix.mysql-version }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: dbx_test
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost -u root"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- run: go mod verify
- run: go build -v ./...
- run: go test -v ./mysql/...
sqlite:
name: Test SQLite
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- run: go mod verify
- run: go build -v ./...
- run: go test -v ./sqlite/...
core:
name: Test Core
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true
- run: go mod verify
- run: go build -v ./...
- run: go test -v ./schema/... ./migration/... ./internal/...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.22"
cache: true
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- run: golangci-lint run --timeout=5m