ci: update agola config

This commit is contained in:
Simone Gotti 2019-07-03 11:17:03 +02:00
parent 2859c3144a
commit 504f538c6e
1 changed files with 7 additions and 6 deletions

View File

@ -34,9 +34,13 @@ local task_build_go(version, arch) = {
{ type: 'clone' },
{ type: 'restore_cache', keys: ['cache-sum-{{ md5sum "go.sum" }}', 'cache-date-'], dest_dir: '/go/pkg/mod/cache' },
{ type: 'run', command: 'make' },
{ type: 'run', name: 'run tests', command: 'SKIP_DOCKER_TESTS=1 SKIP_K8S_TESTS=1 go test -v -count 1 ./...' },
{ type: 'save_cache', key: 'cache-sum-{{ md5sum "go.sum" }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
{ type: 'save_cache', key: 'cache-date-{{ year }}-{{ month }}-{{ day }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
{ type: 'run', name: 'install golangci-lint', command: 'curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1' },
{ type: 'run', command: 'golangci-lint run --deadline 5m' },
{ type: 'run', name: 'build docker/k8s drivers tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/executor/driver -o ./bin/docker-tests' },
{ type: 'run', name: 'run tests', command: 'SKIP_DOCKER_TESTS=1 SKIP_K8S_TESTS=1 go test -v -count 1 ./...' },
{ type: 'save_to_workspace', contents: [{ source_dir: './bin', dest_dir: '/bin/', paths: ['*'] }] },
],
};
@ -50,8 +54,6 @@ local task_build_docker_tests(version, arch) = {
{ type: 'run', command: 'env' },
{ type: 'clone' },
{ type: 'restore_cache', keys: ['cache-sum-{{ md5sum "go.sum" }}', 'cache-date-'], dest_dir: '/go/pkg/mod/cache' },
{ type: 'run', name: 'build docker tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/runservice/executor/driver -o ./bin/docker-tests' },
{ type: 'save_to_workspace', contents: [{ source_dir: './bin', dest_dir: '/bin/', paths: ['*'] }] },
],
};
@ -62,7 +64,6 @@ local task_build_docker_tests(version, arch) = {
tasks: std.flattenArrays([
[
task_build_go(version, arch),
task_build_docker_tests(version, arch),
]
for version in ['1.11', '1.12']
for arch in ['amd64' /*, 'arm64' */]
@ -73,10 +74,10 @@ local task_build_docker_tests(version, arch) = {
steps: [
{ type: 'run', command: 'env' },
{ type: 'restore_workspace', dest_dir: '.' },
{ type: 'run', command: './bin/docker-tests -test.parallel 1 -test.v' },
{ type: 'run', command: 'SKIP_K8S_TESTS=1 AGOLA_TOOLBOX_PATH="./bin" ./bin/docker-tests -test.parallel 1 -test.v' },
],
depends: [
'build docker tests go 1.12 amd64',
'build go 1.12 amd64',
],
},
],