Skip to content

feat: testing in go 1.10 version. #3899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 7, 2018
Merged
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
40 changes: 17 additions & 23 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
workspace:
base: /srv/app
base: /go
path: src/code.gitea.io/gitea

clone:
Expand Down Expand Up @@ -56,21 +56,18 @@ pipeline:
event: [ push, tag, pull_request ]

build-without-gcc:
image: webhippie/golang:1.8
image: golang:1.8
pull: true
environment:
GOPATH: /srv/app
commands:
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
when:
event: [ push, tag, pull_request ]

build:
image: webhippie/golang:edge
image: golang:1.10
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make clean
- make generate
Expand All @@ -85,99 +82,97 @@ pipeline:
event: [ push, tag, pull_request ]

test:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make unit-test-coverage
when:
event: [ push, pull_request ]
branch: [ master ]

test:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make test
when:
event: [ push, pull_request ]
branch: [ release/* ]

test:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- make test
when:
event: [ tag ]

# Commented until db locking have been resolved!
# test-sqlite:
# image: webhippie/golang:edge
# image: golang:1.10
# pull: true
# group: test
# environment:
# TAGS: bindata
# GOPATH: /srv/app
# commands:
# - make test-sqlite
# when:
# event: [ push, tag, pull_request ]

test-mysql:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
- apt-get install -y git-lfs
- make integration-test-coverage
when:
event: [ push, pull_request ]
branch: [ master ]

test-mysql:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
- apt-get install -y git-lfs
- make test-mysql
when:
event: [ tag ]

test-pgsql:
image: webhippie/golang:edge
image: golang:1.10
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
- apt-get install -y git-lfs
- make test-pgsql
when:
event: [ push, tag, pull_request ]

generate-coverage:
image: webhippie/golang:edge
image: golang:1.10
pull: true
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- make coverage
when:
Expand All @@ -198,7 +193,6 @@ pipeline:
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release
when:
Expand Down