Skip to content
Permalink
Browse files

Run `go build ./...` with github action (#1446)

* Create go.yml

* Update go.yml

* Replace travis build with github workflow

* rename

* Pin kustomize version
  • Loading branch information
gdbelvin committed Mar 24, 2020
1 parent 139f966 commit 2d08dc764f2d41caad866df5e1ac424c27a6344b
Showing with 26 additions and 4 deletions.
  1. +24 −0 .github/workflows/build.yml
  2. +2 −4 .travis.yml
@@ -0,0 +1,24 @@
name: Go
on: [push]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v ./...
@@ -21,8 +21,6 @@ env:

jobs:
include:
- name: "build"
script: go build ./...
- name: "lint"
install: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.19.0
script: golangci-lint run --deadline=7m
@@ -42,7 +40,7 @@ jobs:
- name: "kubernetes test"
install:
- curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.16.3/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash && sudo mv kustomize /usr/local/bin/
- curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_amd64.tar.gz && tar xzf ./kustomize_v3.5.4_linux_amd64.tar.gz && sudo mv kustomize /usr/local/bin/
- go get sigs.k8s.io/kind@v0.6.1
- kind create cluster --config deploy/kubernetes/kind-config.yaml
- kubectl cluster-info --context kind-kind
@@ -52,7 +50,7 @@ jobs:
if: branch = master AND type != pull_request
install:
- curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.16.3/bin/linux/amd64/kubectl" && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash && sudo mv kustomize /usr/local/bin/
- curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_amd64.tar.gz && tar xzf ./kustomize_v3.5.4_linux_amd64.tar.gz && sudo mv kustomize /usr/local/bin/
- openssl aes-256-cbc -K $encrypted_555d9b2948d2_key -iv $encrypted_555d9b2948d2_iv -in client_secret.json.enc -d | gcloud auth activate-service-account --key-file /dev/stdin
script:
- ./scripts/deploy.sh

0 comments on commit 2d08dc7

Please sign in to comment.
You can’t perform that action at this time.