Test for 3 latest Go versions in CI

This commit is contained in:
Matthias Loibl 2019-11-10 13:44:10 +01:00
parent 7b564ae8b5
commit f1b13bd42d
No known key found for this signature in database
GPG key ID: 78A796CA74CA38BA
2 changed files with 155 additions and 50 deletions

View file

@ -1,55 +1,54 @@
{
_config+:: {
golang: 'golang:1.13',
},
kind: 'pipeline',
name: 'build',
platform: {
os: 'linux',
arch: 'amd64',
},
local golang = {
name: 'golang',
image: $._config.golang,
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
[
{
kind: 'pipeline',
name: 'go%s' % version,
platform: {
os: 'linux',
arch: 'amd64',
},
when: {
event: {
exclude: ['tag'],
local golang = {
name: 'golang',
image: 'golang:%s' % version,
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
when: {
event: {
exclude: ['tag'],
},
},
},
},
steps: [
golang {
name: 'gomod',
commands: [
'go mod vendor',
'git diff --exit-code',
],
},
steps: [
golang {
name: 'gomod',
commands: [
'go mod vendor',
'git diff --exit-code',
],
},
golang {
name: 'build',
commands: [
'make build',
'make test',
'make test-integration',
],
},
golang {
name: 'build',
commands: [
'make build',
'make test',
'make test-integration',
],
},
golang {
name: 'generate',
commands: [
'make check-license',
'make generate',
'git diff --exit-code',
],
},
],
}
golang {
name: 'generate',
commands: [
'make check-license',
'make generate',
'git diff --exit-code',
],
},
],
}
for version in ['1.13', '1.12', '1.11']
]