diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c57100a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +coverage.txt diff --git a/.travis.yml b/.travis.yml index a147d2a..0a8699f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 7e2a535..1df65bd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/makefile b/makefile new file mode 100644 index 0000000..c2de16d --- /dev/null +++ b/makefile @@ -0,0 +1,2 @@ +tests: + GO111MODULE=on go test -v -short -race -timeout 30s -coverprofile=coverage.txt -covermode=atomic ./...