Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .drone.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

name: ci

jobs:
test:
strategy:
matrix:
# lowest and highest versions of go that are supported by the project
# highest should be the latest version of go
go-version: [ 1.16.x, 1.21.x ]
runs-on: ubuntu-latest
services:
pgsql:
image: postgres:12
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
mysql:
image: mysql:8
env:
MYSQL_DATABASE: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- "3306:3306"
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
ACCEPT_EULA: Y
MSSQL_PID: Standard
SA_PASSWORD: MwantsaSecurePassword1
ports:
- "1433:1433"
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Restore cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Add hosts to /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql mysql mssql" | sudo tee -a /etc/hosts'
- name: check fmt
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Test
run: |
go test -v -tags sqlite
go test -v -tags mysql
go test -v -tags postgresql
go test -v -tags sqlserver
19 changes: 10 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
module src.techknowlogick.com/xormigrate

go 1.14
go 1.16

require (
github.com/denisenkom/go-mssqldb v0.10.0
github.com/go-sql-driver/mysql v1.6.0
github.com/goccy/go-json v0.9.11 // indirect
github.com/denisenkom/go-mssqldb v0.12.3
github.com/go-sql-driver/mysql v1.7.0
github.com/goccy/go-json v0.10.2 // indirect
github.com/joho/godotenv v1.3.0
github.com/lib/pq v1.10.2
github.com/mattn/go-sqlite3 v1.14.9
github.com/stretchr/testify v1.7.0
xorm.io/builder v0.3.12 // indirect
xorm.io/xorm v1.3.2
github.com/lib/pq v1.10.7
github.com/mattn/go-sqlite3 v1.14.16
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/stretchr/testify v1.8.2
xorm.io/builder v0.3.13 // indirect
xorm.io/xorm v1.3.3
)
Loading