Skip to content

chore(deps): deprecated dependency to opentracing #230

chore(deps): deprecated dependency to opentracing

chore(deps): deprecated dependency to opentracing #230

Workflow file for this run

name: go test
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: stable
check-latest: true
cache: true
cache-dependency-path: '**/go.sum'
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: latest
only-new-issues: true
skip-cache: true
module-test:
name: Run unit tests on all modules in this repo
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go_version: ['oldstable', 'stable']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true
cache-dependency-path: '**/go.sum'
- name: Run unit tests
shell: bash
env:
# *.coverage.* pattern is automatically detected by codecov
COVER_PROFILE: 'all_modules.coverage.${{ matrix.os }}.${{ matrix.go_version }}.out'
run: |
# when go1.25 becomes the oldstable, we may replace this bash with "go work test"
declare -a ALL_MODULES
BASH_MAJOR=$(echo $BASH_VERSION|cut -d'.' -f1)
if [[ "${BASH_MAJOR}" -ge 4 ]] ; then
mapfile ALL_MODULES < <(go list -f '{{.Dir}}/...' -m)
else
# for older bash versions, e.g. on macOS runner. This fallback will eventually disappear.
while read line ; do
ALL_MODULES+=("${line}")
done < <(go list -f '{{.Dir}}/...' -m)
fi
echo "::notice title=Modules found::${ALL_MODULES[@]}"
# with go.work file enabled, go test recognizes sub-modules and collects all packages to be covered
# without specifying -coverpkg.
go test -v -race -coverprofile="${COVER_PROFILE}" -covermode=atomic ${ALL_MODULES[@]}
- name: Upload coverage to codecov
uses: codecov/codecov-action@v5
with:
flags: '${{ matrix.go_version }}-${{ matrix.os }}'
fail_ci_if_error: false
verbose: true
test:
needs: [ module-test ]
name: Test
runs-on: ubuntu-latest
steps:
- name: Tests complete
run: |
echo "All tests completed"