mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 14:23:42 +00:00
ci: support
This commit is contained in:
1 parent
ede6a9834d
commit
86a1a2f981
4 files changed
+50
No files matched your search
@@ -0,0 +1,47 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '^1.15.2'
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Lint Go Code
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
|
||||||
|
go get -u golang.org/x/lint/golint
|
||||||
|
golint -set_exit_status ./...
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '^1.15.2'
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run Unit tests.
|
||||||
|
run: go test ./... -v -covermode=count -coverprofile=coverage.txt
|
||||||
|
- uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: ./coverage.txt
|
||||||
|
fail_ci_if_error: true
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [lint, test]
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '^1.15.2'
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: go build -ldflags="-s -w" -o bin/gopeed cmd/gopeed/gopeed.go
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
[](https://github.com/monkeyWie/gopeed-core/actions?query=workflow%3Abuild)
|
||||||
|
[](https://codecov.io/gh/monkeyWie/gopeed-core)
|
||||||
|
|
||||||
## gopeed
|
## gopeed
|
||||||
|
|
||||||
支持多协议(HTTP、BitTorrent)下载的客户端,提供命令行、RESTful API、WebSocket、Go 类库方式来使用。
|
支持多协议(HTTP、BitTorrent)下载的客户端,提供命令行、RESTful API、WebSocket、Go 类库方式来使用。
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user