Skip to content

chore(deps): bump github.com/gofiber/fiber/v3 from 3.1.0 to 3.2.0 in /instrumentation/instafiber/v2 #1606

chore(deps): bump github.com/gofiber/fiber/v3 from 3.1.0 to 3.2.0 in /instrumentation/instafiber/v2

chore(deps): bump github.com/gofiber/fiber/v3 from 3.1.0 to 3.2.0 in /instrumentation/instafiber/v2 #1606

Workflow file for this run

name: Generate SonarCloud report
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
generateCoverage:
name: Code Coverage
runs-on: ubuntu-latest
env:
COSMOS_CONNECTION_URL: ${{ secrets.COSMOS_CONNECTION_URL }}
COSMOS_KEY: ${{ secrets.COSMOS_KEY }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run coverage commands
run: |
#!/bin/bash
# This is a workaround for an issue in the Go toolchain.
# Ref : https://stackoverflow.com/questions/79780882/go-no-such-tool-covdata-in-go-1-25
# Ref : https://github.com/golang/go/issues/75031#issuecomment-3195256688
#
# TODO: We can remove this once the issue is fixed in Go, or when the GitHub runner updates the default Go version to a later release.
#
go env -w GOTOOLCHAIN=go1.25.0+auto
TRACER_PATH=$(pwd)
echo $TRACER_PATH
mkdir coverage
sudo apt-get -y install podman
pip3 install podman-compose
echo "Starting Couchbase"
podman-compose -f docker-compose-integration.yaml up -d
echo "Starting Postgres"
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'mysecretpassword'"
echo "After starting Postgres"
echo "unit tests - core package"
go test -v -coverpkg=./... -cover -covermode atomic -coverprofile $TRACER_PATH/coverage/coverage.out ./... -json > $TRACER_PATH/coverage/coverage.json
echo "integration tests - core package"
INTEGRATION_TESTS_TAGS=("fargate" "gcr" "lambda" "azure" "generic_serverless" "azureContainerApps")
for str in ${INTEGRATION_TESTS_TAGS[@]}; do
go test -v -coverpkg=./... -cover -covermode atomic -coverprofile $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.out -tags="$str integration" ./... -run TestIntegration -json > $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.json
done
DEPRECATED_PKGS=".*instaamqp$"
LIB_LIST=$(find ./instrumentation -name go.mod -exec dirname {} \; | grep -E -v "$DEPRECATED_PKGS")
echo "unit tests - instrumentation packages"
for lib in $LIB_LIST
do echo "Generating test coverage for $lib" && cd "$lib" && go mod tidy && go test -v -coverpkg=./... -cover -covermode atomic -coverprofile $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.out ./... -json > $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.json && cd -;
done
echo "integration tests - instrumentation packages"
INTEGRATIONS_TESTS=("instapgx" "instapgx/v2" "instagocb" "instacosmos")
for str in ${INTEGRATIONS_TESTS[@]}; do
dir=./instrumentation/$str
echo "Generating test coverage for $dir"
cd $dir
go mod tidy
go test -v -tags=integration -coverpkg=./... -cover -covermode atomic -coverprofile $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.out ./... -json > $TRACER_PATH/coverage/coverage_$(date +%s%N)_$RANDOM.json && cd -
done
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 #v6.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}