1
0

Tests can now use config files (#36)

This commit is contained in:
konrad
2018-12-18 16:01:46 +00:00
committed by Gitea
parent 67e94f95b0
commit 97febdb397
58 changed files with 16740 additions and 7785 deletions

View File

@ -8,6 +8,13 @@ clone:
depth: 50
tags: true
services:
database:
image: mariadb:10
environment:
- MYSQL_ROOT_PASSWORD=vikunjatest
- MYSQL_DATABASE=vikunjatest
pipeline:
build:
image: vikunja/golang-build:latest
@ -27,12 +34,41 @@ pipeline:
test:
image: vikunja/golang-build:latest
group: test
pull: true
commands:
- make test
when:
event: [ push, tag, pull_request ]
test-sqlite:
image: vikunja/golang-build:latest
group: test
pull: true
environment:
- VIKUNJA_TESTS_USE_CONFIG=1
- VIKUNJA_DATABASE_TYPE=sqlite
commands:
- make test
when:
event: [ push, tag, pull_request ]
test-mysql:
image: vikunja/golang-build:latest
group: test
pull: true
environment:
- VIKUNJA_TESTS_USE_CONFIG=1
- VIKUNJA_DATABASE_TYPE=mysql
- VIKUNJA_DATABASE_HOST=database
- VIKUNJA_DATABASE_USER=root
- VIKUNJA_DATABASE_PASSWORD=vikunjatest
- VIKUNJA_DATABASE_DATABASE=vikunjatest
commands:
- make test
when:
event: [ push, tag, pull_request ]
# Build a release when tagging
before-static-build:
image: karalabe/xgo-latest:latest
@ -159,3 +195,6 @@ pipeline:
{{repo.owner}}/{{repo.name}}: \[{{build.status}}] Build {{build.number}}
{{commit.author}} pushed to {{commit.branch}} {{commit.sha}}: `{{commit.message}}`
Build started at {{datetime build.started "2006-Jan-02T15:04:05Z" "GMT+2"}} finished at {{datetime build.finished "2006-Jan-02T15:04:05Z" "GMT+2"}}.
when:
event: [ push, tag ]
branch: [ master ]