mirror of
https://github.com/ko-build/ko.git
synced 2025-01-20 18:28:32 +02:00
be4e1ffdd6
* Add trimpath arg to gobuild * Add build constraints for trimpath usage * Reduce duplications across go versions * Change trimpath fn-files for better names * Attempt to apply with minikube on Travis * Attempt to apply with KinD on Travis * Install kind thru curl to not affect build
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
sudo: required
|
|
|
|
dist: trusty
|
|
|
|
services:
|
|
- docker
|
|
|
|
language:
|
|
- go
|
|
|
|
go:
|
|
- '1.12'
|
|
- '1.13'
|
|
|
|
git:
|
|
depth: 1
|
|
|
|
install: true # skipping the default go dependencies install step
|
|
|
|
before_script:
|
|
# Download and install kubectl
|
|
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
|
# Download and install KinD
|
|
- curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-$(uname)-amd64 && chmod +x ./kind && sudo mv kind /usr/local/bin/
|
|
# Create a new Kubernetes cluster using KinD
|
|
- kind create cluster
|
|
- export KUBECONFIG=$(kind get kubeconfig-path)
|
|
|
|
script:
|
|
# Verify that all source files are correctly formatted.
|
|
- find . -name "*.go" | grep -v vendor/ | xargs gofmt -d -e -l
|
|
|
|
- go clean -i
|
|
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
|
|
- bash integration_test.sh
|
|
# TODO: Set up coverage.
|
|
#after_success:
|
|
# - bash <(curl -s https://codecov.io/bash)
|