Skip to content

refactor: docker test #2

refactor: docker test

refactor: docker test #2

Workflow file for this run

name: Database
on:
push:
branches:
- master
pull_request:
paths:
- 'database/**'
env:
GORAVEL_DATABASE_TEST: "true"
jobs:
database:
strategy:
matrix:
go:
- "stable"
- "oldstable"
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
services:
mysql:
image: mysql/mysql-server:latest
env:
MYSQL_DATABASE: goravel
MYSQL_USER: goravel
MYSQL_PASSWORD: GoravelTest123
MYSQL_RANDOM_ROOT_PASSWORD: yes
ports:
- 3306:3306
postgresql:
image: postgres:latest
env:
TZ: Asia/Shanghai
POSTGRES_DB: goravel
POSTGRES_USER: goravel
POSTGRES_PASSWORD: GoravelTest123
ports:
- 5432:5432
sqlserver:
image: mcmoe/mssqldocker:latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password!1234
MSSQL_DB: goravel
MSSQL_USER: goravel
MSSQL_PASSWORD: GoravelTest123
ports:
- 1433:1433
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Run tests
run: bash .github/database.sh