Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 3f2ca6e

Browse files
authored
add go1.13 tests on drone (#1416)
1 parent 71947cf commit 3f2ca6e

File tree

1 file changed

+196
-0
lines changed

1 file changed

+196
-0
lines changed

.drone.yml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,202 @@ services:
537537
- tag
538538
- pull_request
539539

540+
- name: mssql
541+
pull: default
542+
image: microsoft/mssql-server-linux:latest
543+
environment:
544+
ACCEPT_EULA: Y
545+
SA_PASSWORD: yourStrong(!)Password
546+
MSSQL_PID: Developer
547+
when:
548+
event:
549+
- push
550+
- tag
551+
- pull_request
552+
553+
---
554+
kind: pipeline
555+
name: go1.13
556+
557+
platform:
558+
os: linux
559+
arch: amd64
560+
561+
clone:
562+
disable: true
563+
564+
workspace:
565+
base: /go
566+
path: src/github.com/go-xorm/xorm
567+
568+
steps:
569+
- name: git
570+
pull: default
571+
image: plugins/git:next
572+
settings:
573+
depth: 50
574+
tags: true
575+
576+
- name: init_postgres
577+
pull: default
578+
image: postgres:9.5
579+
commands:
580+
- "until psql -U postgres -d xorm_test -h pgsql \\\n -c \"SELECT 1;\" >/dev/null 2>&1; do sleep 1; done\n"
581+
- "psql -U postgres -d xorm_test -h pgsql \\\n -c \"create schema xorm;\"\n"
582+
583+
- name: build
584+
pull: default
585+
image: golang:1.13
586+
environment:
587+
GO111MODULE: "off"
588+
commands:
589+
- go get -t -d -v ./...
590+
- go get -u xorm.io/core
591+
- go get -u xorm.io/builder
592+
- go build -v
593+
when:
594+
event:
595+
- push
596+
- pull_request
597+
598+
- name: build-gomod
599+
pull: default
600+
image: golang:1.13
601+
environment:
602+
GO111MODULE: "on"
603+
GOPROXY: "https://goproxy.cn"
604+
commands:
605+
- go build -v
606+
when:
607+
event:
608+
- push
609+
- pull_request
610+
611+
- name: test-sqlite
612+
pull: default
613+
image: golang:1.13
614+
environment:
615+
GO111MODULE: "on"
616+
GOPROXY: "https://goproxy.cn"
617+
commands:
618+
- "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
619+
- "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
620+
when:
621+
event:
622+
- push
623+
- pull_request
624+
625+
- name: test-mysql
626+
pull: default
627+
image: golang:1.13
628+
environment:
629+
GO111MODULE: "on"
630+
GOPROXY: "https://goproxy.cn"
631+
commands:
632+
- "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
633+
- "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
634+
when:
635+
event:
636+
- push
637+
- pull_request
638+
639+
- name: test-mysql-utf8mb4
640+
pull: default
641+
image: golang:1.13
642+
environment:
643+
GO111MODULE: "on"
644+
GOPROXY: "https://goproxy.cn"
645+
commands:
646+
- "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
647+
- "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
648+
when:
649+
event:
650+
- push
651+
- pull_request
652+
653+
- name: test-mymysql
654+
pull: default
655+
image: golang:1.13
656+
environment:
657+
GO111MODULE: "on"
658+
GOPROXY: "https://goproxy.cn"
659+
commands:
660+
- "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
661+
- "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
662+
when:
663+
event:
664+
- push
665+
- pull_request
666+
667+
- name: test-postgres
668+
pull: default
669+
image: golang:1.13
670+
environment:
671+
GO111MODULE: "on"
672+
GOPROXY: "https://goproxy.cn"
673+
commands:
674+
- "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
675+
- "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
676+
when:
677+
event:
678+
- push
679+
- pull_request
680+
681+
- name: test-postgres-schema
682+
pull: default
683+
image: golang:1.13
684+
environment:
685+
GO111MODULE: "on"
686+
GOPROXY: "https://goproxy.cn"
687+
commands:
688+
- "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
689+
- "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -cache=true -coverprofile=coverage5-2.txt -covermode=atomic"
690+
when:
691+
event:
692+
- push
693+
- pull_request
694+
695+
- name: test-mssql
696+
pull: default
697+
image: golang:1.13
698+
environment:
699+
GO111MODULE: "on"
700+
GOPROXY: "https://goproxy.cn"
701+
commands:
702+
- "go test -v -race -db=\"mssql\" -conn_str=\"server=mssql;user id=sa;password=yourStrong(!)Password;database=xorm_test\" -coverprofile=coverage6-1.txt -covermode=atomic"
703+
- "go test -v -race -db=\"mssql\" -conn_str=\"server=mssql;user id=sa;password=yourStrong(!)Password;database=xorm_test\" -cache=true -coverprofile=coverage6-2.txt -covermode=atomic"
704+
- go get -u github.com/wadey/gocovmerge
705+
- gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage2.1-1.txt coverage2.1-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt coverage6-2.txt > coverage.txt
706+
when:
707+
event:
708+
- push
709+
- pull_request
710+
711+
services:
712+
- name: mysql
713+
pull: default
714+
image: mysql:5.7
715+
environment:
716+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
717+
MYSQL_DATABASE: xorm_test
718+
when:
719+
event:
720+
- push
721+
- tag
722+
- pull_request
723+
724+
- name: pgsql
725+
pull: default
726+
image: postgres:9.5
727+
environment:
728+
POSTGRES_DB: xorm_test
729+
POSTGRES_USER: postgres
730+
when:
731+
event:
732+
- push
733+
- tag
734+
- pull_request
735+
540736
- name: mssql
541737
pull: default
542738
image: microsoft/mssql-server-linux:latest

0 commit comments

Comments
 (0)