Skip to content

Commit

Permalink
Merge pull request #50 from huandu/huandu-github-actions
Browse files Browse the repository at this point in the history
create go.yml for github actions
  • Loading branch information
huandu authored Dec 21, 2021
2 parents ef19aa5 + e2578a7 commit fd7496f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go mod download
go get
- name: Test
run: go test -v -coverprofile=covprofile.cov ./...

- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go get github.com/mattn/goveralls
go install github.com/mattn/goveralls
goveralls -coverprofile=covprofile.cov -service=github
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xstrings

[![Build Status](https://travis-ci.com/huandu/xstrings.svg?branch=master)](https://travis-ci.com/huandu/xstrings)
[![Build Status](https://github.com/huandu/xstrings/workflows/Go/badge.svg)](https://github.com/huandu/xstrings/actions)
[![Go Doc](https://godoc.org/github.com/huandu/xstrings?status.svg)](https://pkg.go.dev/github.com/huandu/xstrings)
[![Go Report](https://goreportcard.com/badge/github.com/huandu/xstrings)](https://goreportcard.com/report/github.com/huandu/xstrings)
[![Coverage Status](https://coveralls.io/repos/github/huandu/xstrings/badge.svg?branch=master)](https://coveralls.io/github/huandu/xstrings?branch=master)
Expand Down

0 comments on commit fd7496f

Please sign in to comment.