2020-03-26 21:43:52 +00:00
|
|
|
name: GoSec CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-30 11:52:42 +01:00
|
|
|
go-version: [go1.12.x, go1.13.x, go1.14.x]
|
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:
|
2020-03-30 11:52:42 +01:00
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
2020-03-26 21:43:52 +00:00
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Tests
|
2020-03-30 11:52:42 +01:00
|
|
|
run: make test
|
2020-03-26 21:43:52 +00:00
|
|
|
coverage:
|
|
|
|
needs: tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2020-03-30 11:52:42 +01:00
|
|
|
GO111MODULE: on
|
2020-03-26 21:43:52 +00:00
|
|
|
steps:
|
2020-03-30 11:52:42 +01:00
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: go1.14.x
|
2020-03-26 21:43:52 +00:00
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Create Test Coverage
|
2020-03-30 11:52:42 +01:00
|
|
|
run: 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 }}
|
|
|
|
file: ./coverage.txt
|
|
|
|
fail_ci_if_error: true
|