Use github actions instead of travis-ci
This commit is contained in:
70
.github/workflows/static_check.yaml
vendored
Normal file
70
.github/workflows/static_check.yaml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: static check
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
imports:
|
||||
name: Imports
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: imports
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
errcheck:
|
||||
name: Errcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: errcheck
|
||||
flags: "-ignoretests"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: lint
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
shadow:
|
||||
name: Shadow
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: shadow
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
staticcheck:
|
||||
name: StaticCheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: staticcheck
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
sec:
|
||||
name: Sec
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@v1.1.0
|
||||
with:
|
||||
run: sec
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
21
.github/workflows/unit_tests.yaml
vendored
Normal file
21
.github/workflows/unit_tests.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Units tests
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
checks:
|
||||
name: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- name: Run tests
|
||||
run: go test -v -covermode=count -coverprofile=coverage.out
|
||||
- name: Convert coverage to lcov
|
||||
uses: jandelgado/gcov2lcov-action@v1.0.8
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
path-to-lcov: coverage.lcov
|
||||
Reference in New Issue
Block a user