2020-04-09 12:01:40 +01:00
|
|
|
name: CI
|
2020-03-26 21:43:52 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
2021-05-10 09:08:04 +01:00
|
|
|
golangci:
|
|
|
|
name: lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: golangci-lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
version: latest
|
2021-02-26 10:12:38 +00:00
|
|
|
tests-go-1-16:
|
2020-03-30 11:59:02 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-26 21:43:52 +00:00
|
|
|
env:
|
2020-03-30 11:52:42 +01:00
|
|
|
GO111MODULE: on
|
2020-03-26 21:43:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Tests
|
2021-02-26 10:12:38 +00:00
|
|
|
uses: cedrickring/golang-action@1.7.0
|
2020-03-30 12:15:21 +01:00
|
|
|
with:
|
|
|
|
args: make test
|
2021-02-26 10:12:38 +00:00
|
|
|
tests-go-1-15:
|
2020-03-30 12:15:21 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Tests
|
2021-02-26 10:12:38 +00:00
|
|
|
uses: cedrickring/golang-action/go1.15@1.7.0
|
2020-03-30 12:15:21 +01:00
|
|
|
with:
|
|
|
|
args: make test
|
2021-02-26 10:12:38 +00:00
|
|
|
tests-go-1-14:
|
2020-03-30 12:15:21 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Tests
|
2021-02-26 10:12:38 +00:00
|
|
|
uses: cedrickring/golang-action/go1.14@1.7.0
|
2020-03-30 12:06:29 +01:00
|
|
|
with:
|
|
|
|
args: make test
|
2020-03-26 21:43:52 +00:00
|
|
|
coverage:
|
2021-02-26 10:12:38 +00:00
|
|
|
needs: [tests-go-1-16, tests-go-1-15, tests-go-1-14]
|
2020-03-26 21:43:52 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2020-03-30 11:52:42 +01:00
|
|
|
GO111MODULE: on
|
2020-03-26 21:43:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Create Test Coverage
|
2021-02-26 10:12:38 +00:00
|
|
|
uses: cedrickring/golang-action@1.7.0
|
2020-03-30 12:06:29 +01:00
|
|
|
with:
|
|
|
|
args: make test-coverage
|
2020-03-26 21:43:52 +00:00
|
|
|
- name: Upload Test Coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
fail_ci_if_error: true
|