Skip to content

Commit

Permalink
update test coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
k3a committed Sep 29, 2023
1 parent e9e10c4 commit d763235
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 32 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test
on: [push]
permissions:
contents: write
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: generate test coverage
run: go test ./... -coverprofile=./cover.out -covermode=atomic
- name: check test coverage
id: coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
#local-prefix: github.com/org/project
threshold-file: 80
threshold-package: 80
threshold-total: 95
- name: make coverage badge
uses: action-badges/[email protected]
if: contains(fromJSON('["refs/heads/master", "refs/heads/main"]'), github.ref)
with:
label: coverage
message: ${{ steps.coverage.outputs.badge-text }}
message-color: ${{ steps.coverage.outputs.badge-color }}
file-name: coverage.svg
badge-branch: badges
github-token: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

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

# html2text
Expand Down

0 comments on commit d763235

Please sign in to comment.