Skip to content

Commit 7880a0b

Browse files
committed
Switch to GitHub workflows
1 parent 19de1d3 commit 7880a0b

File tree

5 files changed

+87
-33
lines changed

5 files changed

+87
-33
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: build
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x]
8+
os: [ubuntu-latest, macos-latest, windows-latest]
9+
runs-on: ${{ matrix.os }}
10+
env:
11+
GO111MODULE: "on"
12+
steps:
13+
- name: Install Go
14+
uses: actions/setup-go@v1
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Download Go modules
22+
run: go mod download
23+
24+
- name: Build
25+
run: go build -v ./...
26+
27+
- name: Test
28+
run: go test ./...
29+
30+
- name: Coverage
31+
env:
32+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
go test -race -covermode atomic -coverprofile=profile.cov ./...
35+
GO111MODULE=off go get github.com/mattn/goveralls
36+
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
37+
if: matrix.go-version == '1.15.x' && matrix.platform == 'ubuntu-latest'

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: lint
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
golangci:
8+
name: lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: golangci-lint
13+
uses: golangci/golangci-lint-action@v2
14+
with:
15+
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
16+
version: v1.31
17+
# Optional: golangci-lint command line arguments.
18+
args: --issues-exit-code=0
19+
# Optional: working directory, useful for monorepos
20+
# working-directory: somedir
21+
# Optional: show only new issues if it's a pull request. The default value is `false`.
22+
only-new-issues: true

.golangci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
run:
2+
tests: false
3+
4+
issues:
5+
max-issues-per-linter: 0
6+
max-same-issues: 0
7+
8+
linters:
9+
enable:
10+
- bodyclose
11+
- dupl
12+
- exportloopref
13+
- goconst
14+
- godot
15+
- godox
16+
- goimports
17+
- goprintffuncname
18+
- gosec
19+
- misspell
20+
- prealloc
21+
- rowserrcheck
22+
- sqlclosecheck
23+
- unconvert
24+
- unparam
25+
- whitespace

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# reflow
22

3-
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/muesli/reflow)
4-
[![Build Status](https://travis-ci.org/muesli/reflow.svg?branch=master)](https://travis-ci.org/muesli/reflow)
3+
[![Latest Release](https://img.shields.io/github/release/muesli/reflow.svg)](https://github.com/muesli/reflow/releases)
4+
[![Build Status](https://github.com/muesli/reflow/workflows/build/badge.svg)](https://github.com/muesli/reflow/actions)
55
[![Coverage Status](https://coveralls.io/repos/github/muesli/reflow/badge.svg?branch=master)](https://coveralls.io/github/muesli/reflow?branch=master)
66
[![Go ReportCard](http://goreportcard.com/badge/muesli/reflow)](http://goreportcard.com/report/muesli/reflow)
7+
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://pkg.go.dev/github.com/muesli/reflow)
78

89
A collection of ANSI-aware methods and `io.Writers` helping you to transform
910
blocks of text. This means you can still style your terminal output with ANSI

0 commit comments

Comments
 (0)