gosec/.github/workflows/main.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

name: GoSec CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
strategy:
matrix:
go-version: [go1.12.x, go1.13.x, go1.14.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
GO111MODULE: on
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Source
uses: actions/checkout@v2
- name: Run Tests
run: make test
coverage:
needs: tests
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: go1.14.x
- name: Checkout Source
uses: actions/checkout@v2
- name: Create Test Coverage
run: 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