Skip to content

Commit 5832aa8

Browse files
committed
ci: send coverage to Coveralls; upgrade action versions
This commit adjusts the following parts of the GitHub Actions configuration for this repo: * Report test coverage to Coveralls via github.com/mattn/goveralls * Bump versions of actions/setup-go and actions/checkout to prevent "Node.js 16 actions are deprecated" warnings * Simplify installation command for golint * Include coverage badge in README
1 parent 7acc57b commit 5832aa8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,27 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Set up Go
12-
uses: actions/setup-go@v2
12+
uses: actions/setup-go@v5
1313
with:
1414
go-version: ${{env.GOVERSION}}
1515

1616
- name: Check out code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818

1919
- name: Run gofmt
2020
run: test -z "$(gofmt -s -d *.go 2>&1)"
2121

2222
- name: Run golint
23-
run: go get golang.org/x/lint/golint && go install golang.org/x/lint/golint && golint -set_exit_status
24-
23+
run: go install golang.org/x/lint/golint@latest && golint -set_exit_status
24+
2525
- name: Run go vet
2626
run: go vet
27-
27+
2828
- name: Run tests
2929
run: go test -v -coverprofile=coverage.out -covermode=count
30+
31+
- name: Report coverage
32+
env:
33+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: go install github.com/mattn/goveralls@latest && goveralls -coverprofile=coverage.out -service=github
35+
continue-on-error: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# knownhosts: enhanced Golang SSH known_hosts management
22

33
[![build status](https://img.shields.io/github/actions/workflow/status/skeema/knownhosts/tests.yml?branch=main)](https://github.com/skeema/knownhosts/actions)
4+
[![code coverage](https://img.shields.io/coveralls/skeema/knownhosts.svg)](https://coveralls.io/r/skeema/knownhosts)
45
[![godoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/skeema/knownhosts)
56

67

0 commit comments

Comments
 (0)