mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50:05 +01:00
Test for 3 latest Go versions in CI
This commit is contained in:
parent
7b564ae8b5
commit
f1b13bd42d
2 changed files with 155 additions and 50 deletions
|
|
@ -1,55 +1,54 @@
|
||||||
{
|
[
|
||||||
_config+:: {
|
{
|
||||||
golang: 'golang:1.13',
|
kind: 'pipeline',
|
||||||
},
|
name: 'go%s' % version,
|
||||||
|
platform: {
|
||||||
kind: 'pipeline',
|
os: 'linux',
|
||||||
name: 'build',
|
arch: 'amd64',
|
||||||
platform: {
|
|
||||||
os: 'linux',
|
|
||||||
arch: 'amd64',
|
|
||||||
},
|
|
||||||
|
|
||||||
local golang = {
|
|
||||||
name: 'golang',
|
|
||||||
image: $._config.golang,
|
|
||||||
pull: 'always',
|
|
||||||
environment: {
|
|
||||||
CGO_ENABLED: '0',
|
|
||||||
GO111MODULE: 'on',
|
|
||||||
},
|
},
|
||||||
when: {
|
|
||||||
event: {
|
local golang = {
|
||||||
exclude: ['tag'],
|
name: 'golang',
|
||||||
|
image: 'golang:%s' % version,
|
||||||
|
pull: 'always',
|
||||||
|
environment: {
|
||||||
|
CGO_ENABLED: '0',
|
||||||
|
GO111MODULE: 'on',
|
||||||
|
},
|
||||||
|
when: {
|
||||||
|
event: {
|
||||||
|
exclude: ['tag'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
steps: [
|
steps: [
|
||||||
golang {
|
golang {
|
||||||
name: 'gomod',
|
name: 'gomod',
|
||||||
commands: [
|
commands: [
|
||||||
'go mod vendor',
|
'go mod vendor',
|
||||||
'git diff --exit-code',
|
'git diff --exit-code',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
golang {
|
golang {
|
||||||
name: 'build',
|
name: 'build',
|
||||||
commands: [
|
commands: [
|
||||||
'make build',
|
'make build',
|
||||||
'make test',
|
'make test',
|
||||||
'make test-integration',
|
'make test-integration',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
golang {
|
golang {
|
||||||
name: 'generate',
|
name: 'generate',
|
||||||
commands: [
|
commands: [
|
||||||
'make check-license',
|
'make check-license',
|
||||||
'make generate',
|
'make generate',
|
||||||
'git diff --exit-code',
|
'git diff --exit-code',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
for version in ['1.13', '1.12', '1.11']
|
||||||
|
]
|
||||||
|
|
|
||||||
108
.drone.yml
108
.drone.yml
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: build
|
name: go1.13
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
|
|
@ -51,4 +51,110 @@ steps:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: go1.12
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: gomod
|
||||||
|
pull: always
|
||||||
|
image: golang:1.12
|
||||||
|
commands:
|
||||||
|
- go mod vendor
|
||||||
|
- git diff --exit-code
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
pull: always
|
||||||
|
image: golang:1.12
|
||||||
|
commands:
|
||||||
|
- make build
|
||||||
|
- make test
|
||||||
|
- make test-integration
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: generate
|
||||||
|
pull: always
|
||||||
|
image: golang:1.12
|
||||||
|
commands:
|
||||||
|
- make check-license
|
||||||
|
- make generate
|
||||||
|
- git diff --exit-code
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: go1.11
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: gomod
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- go mod vendor
|
||||||
|
- git diff --exit-code
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- make build
|
||||||
|
- make test
|
||||||
|
- make test-integration
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: generate
|
||||||
|
pull: always
|
||||||
|
image: golang:1.11
|
||||||
|
commands:
|
||||||
|
- make check-license
|
||||||
|
- make generate
|
||||||
|
- git diff --exit-code
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GO111MODULE: on
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue