Migrating to GH actions (travis-ci.org is deprecated)

This commit is contained in:
Dimitrij Denissenko 2021-03-29 16:04:41 +01:00
parent e7a84e9525
commit ef6c9a7090
2 changed files with 30 additions and 15 deletions

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

@ -0,0 +1,30 @@
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -v ./...

View File

@ -1,15 +0,0 @@
language: go
go:
- "1.7.X"
- "1.8.X"
- "1.9.X"
- "1.10.X"
- master
matrix:
allow_failures:
- go: master
fast_finish: true
script:
- go test -v ./...