Migrate to GitHub actions for CI testing

Travis CI no longer seems to be working:
https://app.travis-ci.com/github/mattn/go-colorable

Add a GitHub action instead, based on the one from
github.com/mattn/go-isatty
This commit is contained in:
Tobias Klauser 2021-09-29 11:49:07 +02:00
parent 6a118b20ed
commit b004592af3
3 changed files with 42 additions and 16 deletions

41
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- '1.17'
- '1.16'
- '1.15'
- '1.14'
- '1.13'
steps:
- uses: actions/setup-go@v2
with:
go-versions: ${{ matrix.go }}
- uses: actions/checkout@v2
- name: test
shell: bash
run: |
./go.test.sh
- name: upload coverage report
uses: codecov/codecov-action@v2
with:
env_vars: OS,GO
env:
OS: ${{ matrix.os }}
GO: ${{ matrix.go }}

View File

@ -1,15 +0,0 @@
language: go
sudo: false
go:
- 1.13.x
- tip
before_install:
- go get -t -v ./...
script:
- ./go.test.sh
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -1,6 +1,6 @@
# go-colorable
[![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable)
[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest)
[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable)
[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)
[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)