Skip to content

Commit

Permalink
Use Coveralls instead of codecov for code coverage tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
baumstern committed Jun 7, 2023
1 parent 738f7f5 commit d120f3a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 72 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ tmp
./coverage/

build-script.sh
codecov.yml
.editorconfig
.golangci.yml
.goreleaser.yml
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ jobs:
- name: Test
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -gcflags=-l

# Generate a Codecov report
# Generate a Coveralls report
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: maci-coordinator [${{ matrix.go-version }}]
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.gz
verbose: true
uses: coverallsapp/github-action@v2
34 changes: 7 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

<div align="center">

[![Build Status](https://img.shields.io/github/checks-status/example/maci-coordinator/main?color=black&style=for-the-badge&logo=github)][github-actions]
[![Code Coverage](https://img.shields.io/codecov/c/github/example/maci-coordinator?color=blue&logo=codecov&style=for-the-badge)][github-actions-tests]
[![Security: bandit](https://img.shields.io/badge/Security-GoSec-lightgrey?style=for-the-badge&logo=springsecurity)](https://github.com/securego/gosec)
[![Dependencies Status](https://img.shields.io/badge/Dependencies-Up%20to%20Date-brightgreen?style=for-the-badge&logo=dependabot)][dependabot-pulls]
[![Semantic Versioning](https://img.shields.io/badge/versioning-semantic-black?style=for-the-badge&logo=semver)][github-releases]
[![Pre-Commit Enabled](https://img.shields.io/badge/Pre--Commit-Enabled-blue?style=for-the-badge&logo=pre-commit)][precommit-config]
[![License](https://img.shields.io/github/license/example/maci-coordinator?color=red&style=for-the-badge)][project-license]
[![Go v1.18](https://img.shields.io/badge/Go-%20v1.18-black?style=for-the-badge&logo=go)][gomod-file]
[![Build Status](https://img.shields.io/github/checks-status/privacy-scaling-explorations/maci-coordinator/main)][github-actions]
[![Code Coverage](https://coveralls.io/repos/github/privacy-scaling-explorations/maci-coordinator/badge.svg)][github-actions-tests]
[![Security: bandit](https://img.shields.io/badge/Security-GoSec-blue)](https://github.com/securego/gosec)
[![GitHub Release](https://img.shields.io/github/v/release/privacy-scaling-explorations/maci-coordinator)][github-releases]
[![License](https://img.shields.io/github/license/privacy-scaling-explorations/maci-coordinator)][project-license]
[![Go v1.18](https://img.shields.io/github/go-mod/go-version/privacy-scaling-explorations/maci-coordinator)][gomod-file]

Coordinator Service: A scalable, reliable, and user-friendly API for MACI coordinators, simplifying zk-SNARK proof generation for MACI circuits.

Expand Down Expand Up @@ -239,23 +237,6 @@ An example of the files generated by the previous command will be;
maci-coordinator_v1.2.1_windows_x86_64.exe
```

### Setting up Codecov

Follow [Codecov Docs][codecov-docs] to activate Codecov for your project repository.

Once you've activated Codecov for your project, you should be able to see the
`Repository Upload Token`. Copy this token, and add it as a secret to your Github
repository. Checkout [Creating secrets for a Repository][creating-secrets] for info
on how to add secrets on Github.

For the secret, the name of the secret should be "`CODECOV_TOKEN`" (no spaces,
copy-paste the string as it is). The value of the secret would be the
`Repository Upload Token` obtained from Codecov.

Save the secret, you should be able to a secret named `CODECOV_TOKEN` in the
*Settings > Secrets* section of your project repository. If this field is visible,
you are done with setting up Codecov, and should be able to see code coverage reports
after the next run of CI pipeline!

### Using Docker

Expand Down Expand Up @@ -353,7 +334,7 @@ The remaining labels can be created as needed!

`maci-coordinator` is powered by a template generated using [`go-template`][go-template-link]

[![go-template](https://img.shields.io/badge/go--template-black?style=for-the-badge&logo=go)][go-template-link]
[![go-template](https://img.shields.io/badge/go--template-black&logo=go)][go-template-link]

</div>

Expand All @@ -376,7 +357,6 @@ The remaining labels can be created as needed!
[release-drafter-config]: ./.github/release-drafter.yml
[makefile-official]: https://www.gnu.org/software/make
[pip-install]: https://pip.pypa.io/en/stable/installation
[codecov-docs]: https://docs.codecov.com/docs#basic-usage
[go-template-link]: https://github.com/notsatan/go-template
[golangci-install]: https://golangci-lint.run/usage/install
[cookiecutter-link]: https://github.com/cookiecutter/cookiecutter
Expand Down
33 changes: 0 additions & 33 deletions codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cookiecutter-config-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cookiecutter_inputs:
contact_email: "paik@a30a.dev"
project_description: "MaciCoordinator is a Go application created using https://github.com/notsatan/go-template"
github_specific_features: "y"
use_codecov: "y"
use_codecov: "n"
use_precommit: "y"
go_version: "1.18"
license: "MIT"

0 comments on commit d120f3a

Please sign in to comment.