-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Back to development * Add Timestamps() macro when generating fizz migrations (#365) * Azure pipelines (#367) * WIP Azure pipelines * Fix typo * Fix soda install script * Fix binary name * Fix tsoda call * Build soda without modules * Use Bash to install soda * Fix pipeline * Fix soda build * Remove go module builds * Fix soda install * Install soda with go install * Fix config parse test * Do not create Docker default DBs * Remove Travis * Update badge in Readme * Remove legacy Anko format fixer (#366) It can still be called using soda fix command. * removes errors.WithStack as its noisy and makes it harder to understand (#372) * removes errors.WithStack as its noisy and makes it harder to understand * fix packr file * Add a fix for old fizz without Timestamps() (#373) * WIP fix old auto-timestamp * Use plush AST to rewrite fizz files * Fix case when files are already using t.Timestamps() * Fix Windows line breaks issue * Add a mention in godocs about the behavior on slices for executors (#375) Fixes #363. * Fix "has_one" pointer association (#378) * hasOneAssociation did not work with pointers * Bump version * Fix IdlePool option (#380) The zero value was not the same as in the stdlib and could cause perfs issues. This will now not call SetMaxIdleConns when IdlePool is set to the zero value. Fixes #376
- Loading branch information
1 parent
9eeaaa1
commit 5a442f5
Showing
74 changed files
with
513 additions
and
297 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
variables: | ||
GOBIN: "$(GOPATH)/bin" # Go binaries path | ||
GOPATH: "$(system.defaultWorkingDirectory)/gopath" # Go workspace path | ||
modulePath: "$(GOPATH)/src/github.com/$(build.repository.name)" # Path to the module"s code | ||
|
||
jobs: | ||
- job: Windows | ||
pool: | ||
vmImage: "vs2017-win2016" | ||
strategy: | ||
matrix: | ||
# SQLite3 | ||
go 1.12 (off) sqlite: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "sqlite" | ||
steps: | ||
- template: azure-tests.yml | ||
|
||
- job: macOS | ||
pool: | ||
vmImage: "macOS-10.13" | ||
strategy: | ||
matrix: | ||
# SQLite3 | ||
go 1.12 (off) sqlite: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "sqlite" | ||
steps: | ||
- template: azure-tests.yml | ||
|
||
- job: Linux | ||
pool: | ||
vmImage: "ubuntu-16.04" | ||
strategy: | ||
matrix: | ||
# Postgres | ||
go 1.10 postgres: | ||
go_version: "1.10" | ||
SODA_DIALECT: "postgres" | ||
go 1.11 (off) postgres: | ||
go_version: "1.11.5" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "postgres" | ||
go 1.12 (off) postgres: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "postgres" | ||
# Cockroach | ||
go 1.12 (off) cockroach: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "cockroach" | ||
# Cockroach SSL | ||
go 1.12 (off) cockroach SSL: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "cockroach_ssl" | ||
# MySQL | ||
go 1.12 (off) mysql: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "mysql" | ||
MYSQL_PORT: "3307" | ||
# SQLite3 | ||
go 1.12 (off) sqlite: | ||
go_version: "1.12" | ||
GO111MODULE: "off" | ||
SODA_DIALECT: "sqlite" | ||
steps: | ||
- template: azure-tests.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
steps: | ||
- task: GoTool@0 | ||
inputs: | ||
version: $(go_version) | ||
- task: Bash@3 | ||
inputs: | ||
targetType: inline | ||
script: | | ||
mkdir -p "$(GOBIN)" | ||
mkdir -p "$(GOPATH)/pkg" | ||
mkdir -p "$(modulePath)" | ||
shopt -s extglob | ||
mv !(gopath) "$(modulePath)" | ||
displayName: "Setup Go Workspace" | ||
- task: Docker@1 | ||
displayName: Run postgres image | ||
inputs: | ||
command: run | ||
imageName: postgres:9.6 | ||
ports: "5432:5432" | ||
condition: and(succeeded(), eq(variables['SODA_DIALECT'], 'postgres')) | ||
- task: Docker@1 | ||
displayName: Run mysql image | ||
inputs: | ||
command: run | ||
imageName: mysql:5.7 | ||
ports: "3307:3306" | ||
envVars: | | ||
MYSQL_ROOT_PASSWORD=root | ||
condition: and(succeeded(), eq(variables['SODA_DIALECT'], 'mysql')) | ||
- task: Docker@1 | ||
displayName: Run cockroach image | ||
inputs: | ||
command: run | ||
imageName: cockroachdb/cockroach:v1.1.1 | ||
ports: "26257:26257" | ||
containerCommand: start --insecure | ||
condition: and(succeeded(), eq(variables['SODA_DIALECT'], 'cockroach')) | ||
- task: Bash@3 | ||
displayName: Install Cockroach SSL | ||
inputs: | ||
targetType: inline | ||
script: | | ||
cd $(modulePath) | ||
mkdir -p crdb/certs | ||
pushd crdb | ||
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0.linux-amd64.tgz | tar zxv | ||
mv cockroach-v2.1.0.linux-amd64/cockroach . | ||
./cockroach cert create-ca --certs-dir certs --ca-key key | ||
./cockroach cert create-client root --certs-dir certs --ca-key key | ||
./cockroach cert create-node localhost 127.0.0.1 `hostname -s` `hostname -f` --certs-dir certs --ca-key key | ||
./cockroach start --certs-dir certs --listen-addr localhost --port 26259 --http-port 8089 --background | ||
popd | ||
condition: and(succeeded(), eq(variables['SODA_DIALECT'], 'cockroach_ssl')) | ||
- script: | | ||
go get -t -v ./... | ||
go install -v -tags sqlite ./soda | ||
workingDirectory: "$(modulePath)" | ||
displayName: "Install soda" | ||
- script: | | ||
$(GOBIN)/soda drop -e $(SODA_DIALECT) | ||
$(GOBIN)/soda create -e $(SODA_DIALECT) | ||
$(GOBIN)/soda migrate -e $(SODA_DIALECT) | ||
workingDirectory: "$(modulePath)" | ||
displayName: "Create DB & run migrations" | ||
- script: | | ||
go test -tags sqlite ./... -v | ||
workingDirectory: "$(modulePath)" | ||
displayName: "Tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.