2020-03-26 23:43:52 +02:00
|
|
|
name: GoSec CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
tests:
|
2020-03-30 12:59:02 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-26 23:43:52 +02:00
|
|
|
env:
|
2020-03-30 12:52:42 +02:00
|
|
|
GO111MODULE: on
|
2020-03-26 23:43:52 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run Tests
|
2020-03-30 13:06:29 +02:00
|
|
|
uses: cedrickring/golang-action@1.5.1
|
|
|
|
with:
|
|
|
|
args: make test
|
2020-03-26 23:43:52 +02:00
|
|
|
coverage:
|
|
|
|
needs: tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2020-03-30 12:52:42 +02:00
|
|
|
GO111MODULE: on
|
2020-03-26 23:43:52 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Create Test Coverage
|
2020-03-30 13:06:29 +02:00
|
|
|
uses: cedrickring/golang-action@1.5.1
|
|
|
|
with:
|
|
|
|
args: make test-coverage
|
2020-03-26 23:43:52 +02:00
|
|
|
- name: Upload Test Coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
file: ./coverage.txt
|
|
|
|
fail_ci_if_error: true
|