From f1e66189f992f459187eda42f9d12fc260111228 Mon Sep 17 00:00:00 2001 From: Matjaz Pirnovar Date: Thu, 23 Apr 2026 10:56:07 -0700 Subject: [PATCH 1/2] [FSSDK-12539] Remove Coveralls from CI checks Coveralls coverage reporting is no longer needed. Remove the unit_test_coverage job, coverage.sh script, and README badge. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/go.yml | 14 ---------- README.md | 1 - scripts/coverage.sh | 56 ---------------------------------------- 3 files changed, 71 deletions(-) delete mode 100755 scripts/coverage.sh diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 64a55245a..d390733b1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -41,20 +41,6 @@ jobs: check-latest: true - run: make cover - unit_test_coverage: - runs-on: ubuntu-latest - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: '1.21.0' - - run: | - go test -race -covermode atomic -coverprofile=covprofile ./... - go install github.com/mattn/goveralls@latest - goveralls -coverprofile=covprofile -service=github - benchmark_test: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index b6692d291..65283033e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Optimizely Go SDK [![Go Report Card](https://goreportcard.com/badge/github.com/optimizely/go-sdk)](https://goreportcard.com/report/github.com/optimizely/go-sdk) -[![Coverage Status](https://coveralls.io/repos/github/optimizely/go-sdk/badge.svg?branch=master)](https://coveralls.io/github/optimizely/go-sdk?branch=master) [![Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/scripts/coverage.sh b/scripts/coverage.sh deleted file mode 100755 index d645b3329..000000000 --- a/scripts/coverage.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# Generate test coverage statistics for Go packages. -# -# Works around the fact that `go test -coverprofile` currently does not work -# with multiple packages, see https://code.google.com/p/go/issues/detail?id=6909 -# -# Usage: script/coverage [--html|--coveralls] -# -# --html Additionally create HTML report and open it in browser -# --coveralls Push coverage statistics to coveralls.io -# - -scriptdir=`dirname $0` -cd $scriptdir && cd .. - -set -e - -workdir=.cover -profile="$workdir/cover.out" -mode=atomic - -generate_cover_data() { - rm -rf "$workdir" - mkdir "$workdir" - - for pkg in "$@"; do - f="$workdir/$(echo $pkg | tr / -).cover" - go test --race -covermode="$mode" -coverprofile="$f" "$pkg" - done - - echo "mode: $mode" >"$profile" - grep -h -v "^mode:" "$workdir"/*.cover >>"$profile" -} - -show_cover_report() { - go tool cover -${1}="$profile" -} - -push_to_coveralls() { - echo "Pushing coverage statistics to coveralls.io" - goveralls -coverprofile="$profile" -} - -generate_cover_data $(go list ./... | grep -v vendor | grep -v mock) -go tool cover -html="./${profile}" -o coverage.html -show_cover_report func -case "$1" in -"") - ;; ---html) - show_cover_report html ;; ---coveralls) - push_to_coveralls ;; -*) - echo >&2 "error: invalid option: $1"; exit 1 ;; -esac From 196c7ac6ba454ed7fd29779d439ddf62a7c055c6 Mon Sep 17 00:00:00 2001 From: Matjaz Pirnovar Date: Thu, 23 Apr 2026 11:06:06 -0700 Subject: [PATCH 2/2] [FSSDK-12539] Restore unit_test_coverage job name for branch protection Keep the job name so required check still passes, but remove the goveralls upload step. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/go.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d390733b1..fc141af6d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -41,6 +41,15 @@ jobs: check-latest: true - run: make cover + unit_test_coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: '1.21.0' + - run: go test -race -covermode atomic -coverprofile=covprofile ./... + benchmark_test: runs-on: ubuntu-latest steps: