mirror of
https://github.com/hslam/shm.git
synced 2025-04-25 13:48:57 +08:00
migrate from travis-ci to actions
This commit is contained in:
parent
7ba7fa59e4
commit
ead1a806c7
39
.github/workflows/go.yml
vendored
Normal file
39
.github/workflows/go.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on: [push,pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.15
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: |
|
||||||
|
go get -v -t -d ./...
|
||||||
|
if [ -f Gopkg.toml ]; then
|
||||||
|
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||||
|
dep ensure
|
||||||
|
fi
|
||||||
|
- name: Build
|
||||||
|
run: go build -v ./...
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: go test -v ./...
|
||||||
|
|
||||||
|
- name: Bench
|
||||||
|
run: go test -v -run="none" -bench=.
|
||||||
|
|
||||||
|
- name: Coverage
|
||||||
|
run: |
|
||||||
|
go test -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
bash <(curl -s https://codecov.io/bash)
|
12
.travis.yml
12
.travis.yml
@ -1,12 +0,0 @@
|
|||||||
language: go
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
go:
|
|
||||||
- 1.13
|
|
||||||
install:
|
|
||||||
- go get -t -v -d ./...
|
|
||||||
script:
|
|
||||||
- go test -v .
|
|
||||||
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
@ -1,6 +1,6 @@
|
|||||||
# shm
|
# shm
|
||||||
[](https://pkg.go.dev/github.com/hslam/shm)
|
[](https://pkg.go.dev/github.com/hslam/shm)
|
||||||
[](https://travis-ci.com/hslam/shm)
|
[](https://github.com/hslam/shm/actions)
|
||||||
[](https://goreportcard.com/report/github.com/hslam/shm)
|
[](https://goreportcard.com/report/github.com/hslam/shm)
|
||||||
[](https://github.com/hslam/shm/blob/master/LICENSE)
|
[](https://github.com/hslam/shm/blob/master/LICENSE)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user