Skip to content

Commit

Permalink
travis yml now added back
Browse files Browse the repository at this point in the history
  • Loading branch information
wwatson committed Oct 15, 2020
1 parent 2826e5f commit a7a5bd8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
language: minimal

services:
- docker

jobs:
include:
- stage: K8s
before_script:
# Download and install go
- wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
- tar -xvf go1.13.linux-amd64.tar.gz
- sudo mv go /usr/local
- export GOROOT=/usr/local/go
- export GOPATH=$HOME/go
- export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
# Download and install KinD
- GO111MODULE=on go get sigs.k8s.io/kind
# Download and install Crystal
- sudo apt update && sudo apt install -y libevent-dev
- wget https://github.com/crystal-lang/crystal/releases/download/0.35.1/crystal-0.35.1-1-linux-x86_64.tar.gz
- tar -xvf crystal-*.tar.gz
- export PATH=$(pwd)/crystal-0.35.1-1/bin:$PATH
- crystal version
# Create a new Kubernetes cluster using KinD
- kind create cluster
# 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/
script:
# Run Crystal Spec
- git fetch --tags
- shards install
- crystal src/cnf-conformance.cr helm_local_install
- crystal src/cnf-conformance.cr setup
- LOG_LEVEL=info crystal spec -v || travis_terminate 1;
# Build Static Bin
- docker pull crystallang/crystal:0.35.1-alpine
- docker run --rm -it -v $PWD:/workspace -w /workspace crystallang/crystal:0.35.1-alpine crystal build src/cnf-conformance.cr --release --static --link-flags "-lxml2 -llzma"
- |
if [ -z "${GITHUB_USER+x}" ] || [ -z "${GITHUB_TOKEN+x}" ]; then
exit 0
else
./cnf-conformance upsert_release
fi

0 comments on commit a7a5bd8

Please sign in to comment.