Skip to content

Commit

Permalink
chore: refactor gh actions into separate yml files (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
morningvera authored Jan 29, 2021
1 parent 0d401c5 commit 0a02473
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 129 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build

on:
push:
tags:
- v*
branches:
- master
pull_request:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.14.x, 1.15.x]

name: go-build
runs-on: ${{ matrix.os }}

steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Build the code
run: make build
66 changes: 0 additions & 66 deletions .github/workflows/eris.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: lint

on:
push:
tags:
- v*
branches:
- master
pull_request:

jobs:
golangci:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.14.x, 1.15.x]

name: golangci-lint
runs-on: ${{ matrix.os }}

steps:
- name: Check out the code
uses: actions/checkout@v2

- name: Lint the code
uses: golangci/golangci-lint-action@v2
with:
version: v1.36
63 changes: 0 additions & 63 deletions .github/workflows/pr.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test-coverage

on:
push:
tags:
- v*
branches:
- master

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.15.x]

name: go-test-cover
runs-on: ${{ matrix.os }}

steps:
- name: Check out the code
uses: actions/checkout@v2

- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Check test coverage
run: make test-coverage

- name: Upload coverage report to CodeCov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./cover.out
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on:
push:
tags:
- v*
branches:
- master
pull_request:

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.14.x, 1.15.x]

name: go-test
runs-on: ${{ matrix.os }}

steps:
- name: Check out the code
uses: actions/checkout@v2

- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Run the tests
run: make test

- name: Check test coverage
run: make test-coverage

0 comments on commit 0a02473

Please sign in to comment.