Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

badges and coverage #2

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ jobs:
run: |
make init
make check
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...

- name: Upload coverage to Codecov
if: success() && matrix.go-version == 1.16 && matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.coverprofile
flags: unittests
fail_ci_if_error: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
coverage.coverprofile

# Dependency directories (remove the comment below to include it)
# vendor/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Modbus TCP and RTU protocol client

[![Go Report Card](https://goreportcard.com/badge/github.com/aldas/go-modbus-client?style=flat-square)](https://goreportcard.com/report/github.com/aldas/go-modbus-client)
[![License](https://img.shields.io/github/license/aldas/go-modbus-client)](https://raw.githubusercontent.com/aldas/echo/go-modbus-client/LICENSE)
[![Codecov](https://codecov.io/gh/aldas/go-modbus-client/branch/master/graph/badge.svg)](https://codecov.io/gh/aldas/go-modbus-client)

Modbus client (TCP/RTU) over TCP for Golang.

* Modbus TCP/IP specification: http:https://www.modbus.org/specs.php
* Modbus TCP/IP and RTU simpler description: http:https://www.simplymodbus.ca/TCP.htm

For questions use Github [Discussions](https://github.com/aldas/go-modbus-client/discussions)

## Installation

```bash
Expand Down
5 changes: 3 additions & 2 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ go tool cover -func="${COVERAGE_DIR}"/coverage.xcov ;
# If needed, generate HTML report
if [[ "$1" == "html" ]]; then
go tool cover -html="${COVERAGE_DIR}"/coverage.xcov -o coverage.html ;

# Remove the coverage files directory
rm -rf "$COVERAGE_DIR";
fi

# Remove the coverage files directory
rm -rf "$COVERAGE_DIR";