Skip to content

Commit

Permalink
Remove Coveralls (letsencrypt#5363)
Browse files Browse the repository at this point in the history
- Remove `goveralls`, `gover`, and `cover` from `build.sh`.
- Remove `--coverage` option from `test.sh`.
- Update Docker image in `docker-compose.yml` and
  `.github/workflows/boulder-ci.yml`

Fixes letsencrypt#5357
  • Loading branch information
beautifulentropy authored Mar 29, 2021
1 parent 69aed25 commit 1e5d89e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/boulder-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
matrix:
# Add additional docker image tags here and all tests will be run with the additional image.
BOULDER_TOOLS_TAG:
- go1.15.7_2021-03-16
- go1.16.2_2021-03-16
- go1.15.7_2021-03-26
- go1.16.2_2021-03-26
# Tests command definitions. Use the entire docker-compose command you want to run.
tests:
# Run ./test.sh --help for a description of each of the flags.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
boulder:
image: &boulder_image letsencrypt/boulder-tools:${BOULDER_TOOLS_TAG:-go1.15.7_2021-03-16}
image: &boulder_image letsencrypt/boulder-tools:${BOULDER_TOOLS_TAG:-go1.15.7_2021-03-26}
environment:
FAKE_DNS: 10.77.77.77
BOULDER_CONFIG_DIR: test/config
Expand Down
36 changes: 2 additions & 34 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ function run_and_expect_silence() {
#
function run_unit_tests() {
if [ "${RACE}" == true ]; then
# Run the full suite of tests once with the -race flag. Since this isn't
# running tests individually we can't collect coverage information.
# Run the full suite of tests once with the -race flag.
go test -race "${UNIT_PACKAGES[@]}" "${FILTER[@]}"
else
# When running locally, we skip the -race flag for speedier test runs. We
Expand All @@ -91,25 +90,6 @@ function run_unit_tests() {
fi
}

function run_test_coverage() {
# Run each test by itself for CI, so we can get coverage. We skip using
# the -race flag here because we have already done a full test run with
# -race in `run_unit_tests` and it adds substantial overhead to run every
# test with -race independently
go test -p 1 -cover -coverprofile=.coverprofile ./...

# Gather all the coverprofiles
gover

# We don't use the run function here because sometimes goveralls fails to
# contact the server and exits with non-zero status, but we don't want to
# treat that as a failure.

# note: not currently enabled in CI passes due to coveralls failing to map
# our github actions token to our coveralls account
goveralls -v -coverprofile=gover.coverprofile -service=github
}

#
# Main CLI Parser
#
Expand All @@ -127,7 +107,6 @@ With no options passed, runs standard battery of tests (lint, unit, and integati
-p <DIR>, --unit-test-package=<DIR> Run unit tests for specific go package(s)
-e, --enable-race-detection Enables -race flag for all unit and integration tests
-n, --config-next Changes BOULDER_CONFIG_DIR from test/config to test/config-next
-c, --coverage Adds coverage to the list of tests to run
-i, --integration Adds integration to the list of tests to run
-s, --start-py Adds start to the list of tests to run
-v, --gomod-vendor Adds gomod-vendor to the list of tests to run
Expand Down Expand Up @@ -160,7 +139,6 @@ while getopts lueciosvgrnhp:f:-: OPT; do
u | unit ) RUN+=("unit") ;;
p | unit-test-package ) check_arg; UNIT_PACKAGES+=("${OPTARG}") ;;
e | enable-race-detection ) RACE="true" ;;
c | coverage ) RUN+=("coverage") ;;
i | integration ) RUN+=("integration") ;;
o | list-integration-tests ) print_list_of_integration_tests ;;
f | filter ) check_arg; FILTER+=("${OPTARG}") ;;
Expand All @@ -178,8 +156,7 @@ shift $((OPTIND-1)) # remove parsed options and args from $@ list

# The list of segments to run. Order doesn't matter. Note: gomod-vendor
# is specifically left out of the defaults, because we don't want to run
# it locally (it could delete local state) We also omit coverage by default
# on local runs because it generates artifacts on disk that aren't needed.
# it locally (it could delete local state).
if [ -z "${RUN[@]+x}" ]
then
RUN+=("lints" "unit" "integration")
Expand Down Expand Up @@ -254,15 +231,6 @@ if [[ "${RUN[@]}" =~ "$STAGE" ]] ; then
run_unit_tests
fi

#
# Unit Test Coverage.
#
STAGE="coverage"
if [[ "${RUN[@]}" =~ "$STAGE" ]] ; then
print_heading "Running Unit Coverage"
run_test_coverage
fi

#
# Integration tests
#
Expand Down
3 changes: 0 additions & 3 deletions test/boulder-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ GO111MODULE=on go get \
bitbucket.org/liamstask/goose/cmd/goose \
github.com/golang/protobuf/[email protected] \
github.com/golang/protobuf/[email protected] \
github.com/mattn/[email protected] \
github.com/modocache/gover \
golang.org/x/tools/cover \
golang.org/x/tools/cmd/stringer

# Pebble's latest version is v2+, but it's not properly go mod compatible, so we
Expand Down

0 comments on commit 1e5d89e

Please sign in to comment.