mirror of
https://github.com/securego/gosec.git
synced 2025-01-24 03:16:54 +02:00
42 lines
960 B
YAML
42 lines
960 B
YAML
|
name: GoSec CI
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- master
|
||
|
jobs:
|
||
|
tests:
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
go-version: ["go1.12", "go1.13", "go1.14"]
|
||
|
env:
|
||
|
GO111MODULE: "on"
|
||
|
steps:
|
||
|
- name: Checkout Source
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Run Tests
|
||
|
uses: cedrickring/golang-action/${{ matrix.go-version }}@1.5.1
|
||
|
with:
|
||
|
args: make test
|
||
|
coverage:
|
||
|
needs: tests
|
||
|
runs-on: ubuntu-latest
|
||
|
env:
|
||
|
GO111MODULE: "on"
|
||
|
steps:
|
||
|
- name: Checkout Source
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Create Test Coverage
|
||
|
uses: cedrickring/golang-action@1.5.1
|
||
|
with:
|
||
|
args: make test-coverage
|
||
|
- name: Upload Test Coverage
|
||
|
uses: codecov/codecov-action@v1
|
||
|
with:
|
||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||
|
file: ./coverage.txt
|
||
|
fail_ci_if_error: true
|