diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..8fac814 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,27 @@ +name: Go +on: push +env: + GO111MODULE: on +jobs: + build: + runs-on: ubuntu-18.04 + name: Go ${{ matrix.go }} + strategy: + matrix: + go: + - '1.9' + - '1.10' + - '1.11' + - '1.12' + - '1.13' + - '1.14' + - '1.15' + - '1.16' + - '1.17' + steps: + - uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - run: go test -race diff --git a/.gitignore b/.gitignore index afef657..ec3a545 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ test_* # VS Code .vscode/ + +# Unix hidden files +.* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 35f713a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go -go: - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x -env: - - GO111MODULE=on -script: - - go test -race ./... diff --git a/README.md b/README.md index 2208247..67db40f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# BT - Another Implementation For Golang [![Build Status](https://api.travis-ci.com/xgfone/bt.svg?branch=master)](https://travis-ci.com/github/xgfone/bt) [![GoDoc](https://pkg.go.dev/badge/github.com/xgfone/bt)](https://pkg.go.dev/github.com/xgfone/bt) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://raw.githubusercontent.com/xgfone/bt/master/LICENSE) +# BT - Another Implementation For Golang [![Build Status](https://github.com/xgfone/bt/actions/workflows/go.yml/badge.svg)](https://github.com/xgfone/bt/actions/workflows/go.yml) [![GoDoc](https://pkg.go.dev/badge/github.com/xgfone/bt)](https://pkg.go.dev/github.com/xgfone/bt) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://raw.githubusercontent.com/xgfone/bt/master/LICENSE) A pure golang implementation of [BitTorrent](http://bittorrent.org/beps/bep_0000.html) library, which is inspired by [dht](https://github.com/shiyanhui/dht) and [torrent](https://github.com/anacrolix/torrent).