Skip to content

Commit

Permalink
add ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Jan 6, 2024
1 parent 9166d4c commit 86e9e70
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test

on: [push, pull_request]

jobs:
test:
strategy:
matrix:
go-version: ['>=1.18.0']
os: [ubuntu-latest,]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Unshallow git checkout
run: git fetch --prune --unshallow
- name: Run tests
run: go test -v -covermode=count -coverprofile=coverage.out ./...
- name: Convert coverage to lcov
uses: jandelgado/[email protected]
- name: Report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Test
test:
go test -v -cover -coverprofile=coverage.out ./...
go test -v -failfast -count=1 -cover -covermode=count -coverprofile=coverage.out ./...
go tool cover -func coverage.out

.phony: test
.phony: test
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[![test](https://github.com/davesavic/clink/workflows/test/badge.svg)](https://github.com/davesavic/clink/actions?query=workflow%3Atest)
[![coverage](https://coveralls.io/repos/github/davesavic/clink/badge.svg?branch=main)](https://coveralls.io/github/davesavic/clink?branch=main)
[![goreportcard](https://goreportcard.com/badge/github.com/davesavic/clink)](https://goreportcard.com/report/github.com/davesavic/clink)
[![gopkg](https://pkg.go.dev/badge/github.com/davesavic/clink.svg)](https://pkg.go.dev/github.com/davesavic/clink)
[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/davesavic/clink/blob/master/LICENSE)



## Clink: A Configurable HTTP Client for Go

Clink is a highly configurable HTTP client for Go, designed for ease of use, extendability, and robustness. It supports various features like automatic retries and request rate limiting, making it ideal for both simple and advanced HTTP requests.
Expand Down Expand Up @@ -52,4 +60,4 @@ func main() {
For more examples, see the [examples](https://github.com/davesavic/clink/tree/master/examples) directory.

### Contributing
Contributions to Clink are welcome! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request.
Contributions to Clink are welcome! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request.

0 comments on commit 86e9e70

Please sign in to comment.