Skip to content

Commit

Permalink
use github action insead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
smallnest committed Sep 10, 2023
1 parent 5b9fdc6 commit 0aaad01
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/go.yaml
@@ -0,0 +1,36 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...

- name: Test
run: go test -v -coverprofile=profile.cov ./...

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
flag-name: Go-${{ matrix.go }}
parallel: true

# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,7 @@

Unbounded chan with ringbuffer.

[![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![GoDoc](https://godoc.org/github.com/smallnest/chanx?status.png)](http://godoc.org/github.com/smallnest/chanx) [![travis](https://travis-ci.org/smallnest/chanx.svg?branch=main)](https://travis-ci.org/smallnest/chanx) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/chanx)](https://goreportcard.com/report/github.com/smallnest/chanx) [![coveralls](https://coveralls.io/repos/smallnest/chanx/badge.svg?branch=main&service=github)](https://coveralls.io/github/smallnest/chanx?branch=main)
[![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![GitHub](https://img.shields.io/github/license/smallnest/chanx) ![GitHub Action](https://github.com/smallnest/chanx/actions/workflows/go.yaml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/chanx)](https://goreportcard.com/report/github.com/smallnest/chanx) [![GoDoc](https://godoc.org/github.com/smallnest/chanx?status.png)](http://godoc.org/github.com/smallnest/chanx)

Refer to the below articles and issues:
1. https://github.com/golang/go/issues/20352
Expand All @@ -14,7 +14,7 @@ Refer to the below articles and issues:
## Usage

If you want to use it with Go 1.17.x or below, you can use `github.com/smallnest/chanx@1.0.0`.
Since `github.com/smallnest/chanx@1.1.0`, it support Go generic.
Since `github.com/smallnest/chanx@1.1.0`, it support Go generics.

```go
ch := NewUnboundedChan(1000)
Expand Down

0 comments on commit 0aaad01

Please sign in to comment.