feat: use opaque key to identify trace-provider (#241) #650
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
- "LICENSE" | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
go: ["1.22", "1.23"] | |
steps: | |
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check go.mods | |
uses: evantorrie/mott-the-tidier@v1-beta | |
with: | |
gomods: | | |
**/go.mod | |
- name: download dependencies | |
run: | | |
make deps | |
- name: Lint files | |
uses: golangci/golangci-lint-action@v6.1.0 | |
with: | |
# Required: the version of golangci-lint is required. | |
version: v1.61.0 | |
args: -v | |
only-new-issues: true | |
- name: Run tests | |
run: CGO_ENABLED=1 go test -coverprofile=coverage.txt -v ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
name: go-agent test reports | |
fail_ci_if_error: true | |
files: ./coverage.txt | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: check examples | |
run: make check-examples | |
security: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/golang@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --severity-threshold=low |