Skip to content

Support pgx versioned names #77

Support pgx versioned names

Support pgx versioned names #77

Workflow file for this run

name: Code-Testing
on:
push:
branches:
- "main"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_DB: sqlxtest
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql
ports:
- 33306:3306
env:
MYSQL_USER: mysql
MYSQL_DATABASE: sqlxtest
MYSQL_PASSWORD: mysql
MYSQL_ROOT_PASSWORD: mysql
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: "Install Golang"
uses: actions/setup-go@v4
with:
go-version: "^1.20"
- name: "Install all dependencies"
run: |
go mod download
- name: "Install Gotestsum"
run: |
go install gotest.tools/gotestsum@latest
- name: "Run Tests"
env:
SQLX_POSTGRES_DSN: "postgres://postgres:[email protected]:5432/sqlxtest?sslmode=disable"
SQLX_MYSQL_DSN: "root:mysql@tcp(127.0.0.1:33306)/sqlxtest?parseTime=true"
SQLX_SQLITE_DSN: "./sqlxtest.sqlite"
run: |
gotestsum --format testname ./...