forked from cnti-testcatalog/testsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.old
44 lines (42 loc) · 1.84 KB
/
.travis.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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