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 dc7f947 commit cd45a81
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
14 changes: 0 additions & 14 deletions .circleci/config.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 }}"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Parsemail - simple email parsing Go library

[![Build Status](https://circleci.com/gh/k3a/parsemail.svg?style=shield)](https://circleci.com/gh/k3a/parsemail) [![Coverage Status](https://coveralls.io/repos/github/k3a/parsemail/badge.svg?branch=master)](https://coveralls.io/github/k3a/parsemail?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/k3a/parsemail)](https://goreportcard.com/report/github.com/k3a/parsemail)
[![test](https://github.com/k3a/parsemail/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/k3a/parsemail/actions/workflows/test.yml)
[![coverage](https://raw.githubusercontent.com/k3a/parsemail/badges/.badges/master/coverage.svg)](https://github.com/k3a/parsemail/tree/badges)
[![Go Report Card](https://goreportcard.com/badge/github.com/k3a/parsemail)](https://goreportcard.com/report/github.com/k3a/parsemail)

> The [original repo](https://github.com/DusanKasan/parsemail) is unmaintained. This is an active fork replacing the original repo. Contributions are welcome.
Expand Down

0 comments on commit cd45a81

Please sign in to comment.