Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve github action #493

Merged
merged 2 commits into from Feb 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 22 additions & 25 deletions .github/workflows/ci.yml
@@ -1,12 +1,12 @@
name: Kubernetes-sigs/krew CI
on:
on:
push:
branches:
branches:
- '*'
tags:
tags:
- 'v*.*.*'
pull_request:
branches:
branches:
- '*'

jobs:
Expand All @@ -23,47 +23,47 @@ jobs:

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

- name: Add GOPATH/bin to PATH
run: echo "::add-path::$(go env GOPATH)/bin"

- name: Install dependencies
run: go mod download

- name: Install gox
run: hack/install-gox.sh
- name: Verify code quality

- name: Ensure go.mod is already tidied
run: go mod tidy && git diff --no-patch --exit-code

- name: Verify code patterns
run: hack/verify-code-patterns.sh

- name: Verify boilerplate
run: hack/verify-boilerplate.sh

- name: Run code lint
run: hack/run-lint.sh

- name: Run unit tests
run: go test -short -coverprofile=coverage.txt -covermode=atomic ./...

- name: Make binaries && verify krew installation
run: hack/make-all.sh

- name: Ensure kubectl installed
run: hack/ensure-kubectl-installed.sh

- name: Verify installation
run: hack/verify-installation.sh

- name: Run integration tests
run: hack/run-integration-tests.sh
- name: Receipts upgrade migrations

- name: Verify receipt migration from v0.2.x to v0.3.x
run: hack/verify-receipts-upgrade-migration.sh

- name: Create release
- name: Create a new release
if: contains(github.ref, 'tags')
id: create_release
uses: actions/create-release@v1.0.0
Expand All @@ -75,7 +75,7 @@ jobs:
draft: false
prerelease: false

- name: Upload binaries to release
- name: Upload binaries to the new release
if: contains(github.ref, 'tags')
uses: svenstaro/upload-release-action@v1-release
with:
Expand All @@ -84,6 +84,3 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true