Skip to content

Commit

Permalink
Set up a GitHub action and start uploading coverage to Codacy (#91)
Browse files Browse the repository at this point in the history
And update the README.
  • Loading branch information
kevincantu authored May 28, 2021
1 parent e23096c commit 701b400
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 17 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build-go
on:
push:
branches:
- master
pull_request:

defaults:
run:
shell: bash

env:
GO111MODULE: on

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- 1.15
- 1.16
steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: setup
run: |
go version
go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go get github.com/securego/gosec/cmd/gosec
#go get golang.org/x/tools/cmd/cover
go get github.com/axw/gocov/gocov
go get github.com/AlekSi/gocov-xml
- name: build
run: |
make
# note: uncertain how gracefully this handles the matrix
- name: coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}

# a comma-separated list
coverage-reports: "./coverage.xml"
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ lint:

test:
go test ./... -race -cover -covermode=atomic -coverprofile=unit_coverage.cov
gocov convert ./unit_coverage.cov | gocov-xml > ./coverage.xml

sec:
gosec -quiet ./...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# addedeffect

[![codecov](https://codecov.io/gh/aporeto-inc/addedeffect/branch/master/graph/badge.svg?token=35eVoGUwHX)](https://codecov.io/gh/aporeto-inc/addedeffect)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fece193c0bc0457e9fac387cde4c44ba)](https://www.codacy.com/gh/PaloAltoNetworks/addedeffect/dashboard?utm_source=github.com&utm_medium=referral&utm_content=PaloAltoNetworks/addedeffect&utm_campaign=Badge_Grade) [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fece193c0bc0457e9fac387cde4c44ba)](https://www.codacy.com/gh/PaloAltoNetworks/addedeffect/dashboard?utm_source=github.com&utm_medium=referral&utm_content=PaloAltoNetworks/addedeffect&utm_campaign=Badge_Coverage)

> README IS A WORK IN PROGRESS AS WE ARE WRITTING MORE DOCUMENTATION ABOUT THIS PACKAGE.
Expand Down

0 comments on commit 701b400

Please sign in to comment.