Skip to content

Commit 867ad1e

Browse files
authored
Improve github action (#493)
* Improve github action * whitespace (trim) * better step naming * Apply comments
1 parent 5826e5e commit 867ad1e

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Kubernetes-sigs/krew CI
2-
on:
2+
on:
33
push:
4-
branches:
4+
branches:
55
- '*'
6-
tags:
6+
tags:
77
- 'v*.*.*'
88
pull_request:
9-
branches:
9+
branches:
1010
- '*'
1111

1212
jobs:
@@ -23,47 +23,47 @@ jobs:
2323

2424
- name: Check out code into the Go module directory
2525
uses: actions/checkout@v2
26-
27-
- name: Add GOPATH
26+
27+
- name: Add GOPATH/bin to PATH
2828
run: echo "::add-path::$(go env GOPATH)/bin"
29-
29+
3030
- name: Install dependencies
3131
run: go mod download
32-
32+
3333
- name: Install gox
3434
run: hack/install-gox.sh
35-
36-
- name: Verify code quality
35+
36+
- name: Ensure go.mod is already tidied
3737
run: go mod tidy && git diff --no-patch --exit-code
38-
38+
3939
- name: Verify code patterns
4040
run: hack/verify-code-patterns.sh
41-
41+
4242
- name: Verify boilerplate
4343
run: hack/verify-boilerplate.sh
44-
44+
4545
- name: Run code lint
4646
run: hack/run-lint.sh
47-
47+
4848
- name: Run unit tests
4949
run: go test -short -coverprofile=coverage.txt -covermode=atomic ./...
50-
50+
5151
- name: Make binaries && verify krew installation
5252
run: hack/make-all.sh
53-
53+
5454
- name: Ensure kubectl installed
5555
run: hack/ensure-kubectl-installed.sh
56-
56+
5757
- name: Verify installation
5858
run: hack/verify-installation.sh
59-
59+
6060
- name: Run integration tests
6161
run: hack/run-integration-tests.sh
62-
63-
- name: Receipts upgrade migrations
62+
63+
- name: Verify receipt migration from v0.2.x to v0.3.x
6464
run: hack/verify-receipts-upgrade-migration.sh
6565

66-
- name: Create release
66+
- name: Create a new release
6767
if: contains(github.ref, 'tags')
6868
id: create_release
6969
uses: actions/[email protected]
@@ -75,7 +75,7 @@ jobs:
7575
draft: false
7676
prerelease: false
7777

78-
- name: Upload binaries to release
78+
- name: Upload binaries to the new release
7979
if: contains(github.ref, 'tags')
8080
uses: svenstaro/upload-release-action@v1-release
8181
with:
@@ -84,6 +84,3 @@ jobs:
8484
tag: ${{ github.ref }}
8585
overwrite: true
8686
file_glob: true
87-
88-
89-

0 commit comments

Comments
 (0)