Skip to content

Commit

Permalink
refactor: ihange Travis CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Andres Virviescas Santana committed Sep 27, 2021
1 parent a580bf9 commit 0033138
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 41 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: go version
- run: go get -t -v ./...
- run: GOOS=linux go build
- run: GOOS=darwin go build
- run: GOOS=freebsd go build
- run: GOOS=windows go build
- run: GOARCH=386 go build
10 changes: 10 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: go version
- run: go get -t -v ./...
- run: go test -v -cover -race ./...

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
flag-name: Go-${{ matrix.os }}-${{ matrix.go-version }}
parallel: true

finish:
needs: test
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
39 changes: 0 additions & 39 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,7 +1,7 @@
go-logger
=========

[![Build Status](https://travis-ci.org/savsgio/go-logger.svg?branch=master)](https://travis-ci.org/savsgio/go-logger)
[![Test status](https://github.com/savsgio/go-logger/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/savsgio/go-logger/actions?workflow=test)
[![Coverage Status](https://coveralls.io/repos/github/savsgio/go-logger/badge.svg?branch=master)](https://coveralls.io/github/savsgio/go-logger?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/savsgio/go-logger)](https://goreportcard.com/report/github.com/savsgio/go-logger)
[![GoDev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/savsgio/go-logger/v2)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/savsgio/go-logger/v2

go 1.11
go 1.12

require github.com/valyala/bytebufferpool v1.0.0

0 comments on commit 0033138

Please sign in to comment.