forked from gobuffalo/pop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
7ba6947
commit 669c04a
Showing
6 changed files
with
147 additions
and
149 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
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