migrate from travis-ci to actions

This commit is contained in:
hslam 2020-12-18 12:58:16 +08:00
parent b2ef55d958
commit 2977a95e37
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 @@
# ftok
[![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/ftok)](https://pkg.go.dev/github.com/hslam/ftok)
[![Build Status](https://api.travis-ci.com/hslam/ftok.svg?branch=master)](https://travis-ci.com/hslam/ftok)
[![Build Status](https://github.com/hslam/ftok/workflows/build/badge.svg)](https://github.com/hslam/ftok/actions)
[![codecov](https://codecov.io/gh/hslam/ftok/branch/master/graph/badge.svg)](https://codecov.io/gh/hslam/ftok)
[![Go Report Card](https://goreportcard.com/badge/github.com/hslam/ftok)](https://goreportcard.com/report/github.com/hslam/ftok)
[![LICENSE](https://img.shields.io/github/license/hslam/ftok.svg?style=flat-square)](https://github.com/hslam/ftok/blob/master/LICENSE)