migrate from travis-ci to actions

This commit is contained in:
hslam 2020-12-18 13:03:35 +08:00
parent fc01dd0762
commit 6a2e3778df
4 changed files with 40 additions and 13 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

39
.github/workflows/go.yml vendored Normal file
View 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)

View File

@ -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)

View File

@ -1,6 +1,6 @@
# msg
[![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/msg)](https://pkg.go.dev/github.com/hslam/msg)
[![Build Status](https://api.travis-ci.com/hslam/msg.svg?branch=master)](https://travis-ci.com/hslam/msg)
[![Build Status](https://github.com/hslam/msg/workflows/build/badge.svg)](https://github.com/hslam/msg/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/hslam/msg)](https://goreportcard.com/report/github.com/hslam/msg)
[![LICENSE](https://img.shields.io/github/license/hslam/msg.svg?style=flat-square)](https://github.com/hslam/msg/blob/master/LICENSE)