Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
go: [1.8, 1.9, '1.10', 1.11, 1.12, 1.13, 1.14, 1.15, 1.16]

steps:

- name: Checkout to GOPATH
if: ${{ matrix.go == '1.8' || matrix.go == '1.9' || matrix.go == '1.10' }}
uses: actions/checkout@v2
with:
path: go/src/github.com/${{ github.repository }}

- name: Checkout with no GOPATH
if: ${{ matrix.go != '1.8' && matrix.go != '1.9' && matrix.go != '1.10' }}
uses: actions/checkout@v2

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}

- name: "Setup dependencies"
if: ${{ matrix.go == '1.8' || matrix.go == '1.9' || matrix.go == '1.10' }}
run: go get -t ./... && cd $GOPATH/src/github.com/stretchr/testify/ && git checkout v1.2.2 && cd - && pwd
env:
GOPATH: /home/runner/work/errorx/errorx/go

- name: Build no modules
if: ${{ matrix.go == '1.8' || matrix.go == '1.9' || matrix.go == '1.10' }}
run: cd go/src/github.com/${{ github.repository }} && go test -v ./...
env:
GOPATH: /home/runner/work/errorx/errorx/go

- name: Build with modules
if: ${{ matrix.go != '1.8' && matrix.go != '1.9' && matrix.go != '1.10' }}
run: go test -v ./...

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.com/joomcode/errorx.svg?branch=master)](https://travis-ci.com/joomcode/errorx)
[![Github Actions Build Status](https://github.com/joomcode/errorx/workflows/CI/badge.svg)](https://github.com/joomcode/errorx/actions)
[![Travis Build Status](https://travis-ci.com/joomcode/errorx.svg?branch=master)](https://travis-ci.com/joomcode/errorx)
[![GoDoc](https://img.shields.io/static/v1?label=godev&message=reference&color=00add8)](https://pkg.go.dev/github.com/joomcode/errorx?tab=doc)
[![Report Card](https://goreportcard.com/badge/github.com/joomcode/errorx)](https://goreportcard.com/report/github.com/joomcode/errorx)
[![gocover.io](https://gocover.io/_badge/github.com/joomcode/errorx)](https://gocover.io/github.com/joomcode/errorx)
Expand Down