Switch from TravisCI to GitHub Actions (#49)

This commit is contained in:
Christian Muehlhaeuser
2019-12-31 13:09:07 +01:00
committed by GitHub
parent 03172b8121
commit 40817a7a74
3 changed files with 40 additions and 30 deletions
+39
View File
@@ -0,0 +1,39 @@
name: build
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.11.x, 1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Download Go modules
run: go mod download
- name: Build
run: go build -v ./...
- name: Test
run: go test ./...
if: matrix.platform != 'windows-latest'
- name: Coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go test -race -covermode atomic -coverprofile=profile.cov ./...
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
if: matrix.go-version == '1.13.x' && matrix.platform == 'ubuntu-latest'
-29
View File
@@ -1,29 +0,0 @@
language: go
os:
- linux
- osx
go:
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
- tip
matrix:
allow_failures:
- go: tip
before_install:
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then go get github.com/axw/gocov/gocov github.com/modocache/gover github.com/mattn/goveralls; fi
script:
- go test -v -tags ci ./...
- if [[ $TRAVIS_GO_VERSION == 1.13* ]]; then $GOPATH/bin/goveralls -service=travis-ci; fi
notifications:
email:
on_success: change
on_failure: always
+1 -1
View File
@@ -1,6 +1,6 @@
# Glamour
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/charmbracelet/glamour) [![Build Status](https://travis-ci.org/charmbracelet/glamour.svg?branch=master)](https://travis-ci.org/charmbracelet/glamour) [![Coverage Status](https://coveralls.io/repos/github/charmbracelet/glamour/badge.svg?branch=master)](https://coveralls.io/github/charmbracelet/glamour?branch=master) [![Go ReportCard](http://goreportcard.com/badge/charmbracelet/glamour)](http://goreportcard.com/report/charmbracelet/glamour)
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/charmbracelet/glamour) [![Build Status](https://github.com/charmbracelet/glamour/workflows/build/badge.svg)](https://github.com/charmbracelet/glamour/actions) [![Coverage Status](https://coveralls.io/repos/github/charmbracelet/glamour/badge.svg?branch=master)](https://coveralls.io/github/charmbracelet/glamour?branch=master) [![Go ReportCard](http://goreportcard.com/badge/charmbracelet/glamour)](http://goreportcard.com/report/charmbracelet/glamour)
Write gorgeous command-line tools with *glamour*!