Merge pull request #21 from TerraNovaUser/patch-1

Add code coverage
This commit is contained in:
Liz Rice 2019-08-21 13:05:21 +01:00 committed by GitHub
commit 333b5ff7cd
Failed to generate hash of commit
4 changed files with 21 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
coverage.txt

View file

@ -1,8 +1,21 @@
---
language: go
sudo: required
notifications:
email: false
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y rpm
script:
- go test ./...
- make tests
after_success:
- bash <(curl -s https://codecov.io/bash)
env:
matrix:
- GO111MODULE=on

View file

@ -1,5 +1,9 @@
[![Build Status](https://travis-ci.org/aquasecurity/linux-bench.svg?branch=master)](https://travis-ci.org/aquasecurity/linux-bench)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Coverage Status][cov-img]][cov]
[cov-img]: https://codecov.io/github/aquasecurity/linux-bench/branch/master/graph/badge.svg
[cov]: https://codecov.io/github/aquasecurity/linux-bench
Linux-bench is a Go application that checks whether The linux operating system is configured securely by running the checks documented in the CIS Distribution Independent Linux Benchmark.

2
makefile Normal file
View file

@ -0,0 +1,2 @@
tests:
GO111MODULE=on go test -v -short -race -timeout 30s -coverprofile=coverage.txt -covermode=atomic ./...