Skip to content

Commit d763235

Browse files
committed
update test coverage workflow
1 parent e9e10c4 commit d763235

4 files changed

Lines changed: 39 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test
2+
on: [push]
3+
permissions:
4+
contents: write
5+
jobs:
6+
test:
7+
name: test
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: checkout
11+
uses: actions/checkout@v4
12+
- name: setup go
13+
uses: actions/setup-go@v4
14+
with:
15+
go-version-file: go.mod
16+
- name: generate test coverage
17+
run: go test ./... -coverprofile=./cover.out -covermode=atomic
18+
- name: check test coverage
19+
id: coverage
20+
uses: vladopajic/go-test-coverage@v2
21+
with:
22+
profile: cover.out
23+
#local-prefix: github.com/org/project
24+
threshold-file: 80
25+
threshold-package: 80
26+
threshold-total: 95
27+
- name: make coverage badge
28+
uses: action-badges/core@0.2.2
29+
if: contains(fromJSON('["refs/heads/master", "refs/heads/main"]'), github.ref)
30+
with:
31+
label: coverage
32+
message: ${{ steps.coverage.outputs.badge-text }}
33+
message-color: ${{ steps.coverage.outputs.badge-color }}
34+
file-name: coverage.svg
35+
badge-branch: badges
36+
github-token: "${{ secrets.GITHUB_TOKEN }}"

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[![GoDoc](https://godoc.org/github.com/k3a/html2text?status.svg)](https://godoc.org/github.com/k3a/html2text)
2-
[![Build Status](https://travis-ci.org/k3a/html2text.svg?branch=master)](https://travis-ci.org/k3a/html2text)
3-
[![Coverage Status](https://coveralls.io/repos/github/k3a/html2text/badge.svg?branch=master)](https://coveralls.io/github/k3a/html2text?branch=master)
1+
[![Go Reference](https://pkg.go.dev/badge/github.com/k3a/html2text.svg)](https://pkg.go.dev/github.com/k3a/html2text)
2+
[![test](https://github.com/k3a/html2text/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/k3a/html2text/actions/workflows/test.yml)
3+
[![coverage](https://raw.githubusercontent.com/k3a/html2text/badges/.badges/master/coverage.svg)](https://github.com/k3a/html2text/tree/badges)
44
[![Report Card](https://goreportcard.com/badge/github.com/k3a/html2text)](https://goreportcard.com/report/github.com/k3a/html2text)
55

66
# html2text

0 commit comments

Comments
 (0)