Skip to content

Commit

Permalink
Add github action for integration testing and clean up other actions
Browse files Browse the repository at this point in the history
  • Loading branch information
akrzos committed Feb 6, 2021
1 parent 517b274 commit c323e6f
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 59 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/go.yml → .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Go Build

on:
push:
Expand All @@ -7,7 +7,6 @@ on:
branches: [ main ]

jobs:

build:
runs-on: ubuntu-latest
steps:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go Lint

on: push

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the action will use pre-installed Go
# skip-go-installation: true
28 changes: 28 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go Release

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --config deploy/.goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 0 additions & 28 deletions .github/workflows/golanglint-ci.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/integration-kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Integration Test

on: push

jobs:
kind-test:
name: integration test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: engineerd/setup-kind@v0.5.0

- name: Check kind cluster
run: |
kubectl cluster-info
kubectl get pods -n kube-system
echo "current-context:" $(kubectl config current-context)
echo "environment-kubeconfig:" ${KUBECONFIG}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Build kubeSize
run: |
go build -o bin/kubectl-capacity github.com/akrzos/kubeSize/
- name: Run kubeSize commands
run: |
bin/kubectl-capacity c
bin/kubectl-capacity nr
bin/kubectl-capacity no
bin/kubectl-capacity ns
29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit c323e6f

Please sign in to comment.