Set Go support policy to latest-2 #38
Workflow file for this run
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: gha | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "**/*.md" | |
- "LICENSE" | |
pull_request: | |
jobs: | |
"CI": | |
name: ${{ matrix.platform.arch }}, ${{ matrix.platform.os }}, Go-${{ matrix.go-version }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
matrix: # Use versions consistent with zipkin-go's Go support policy. | |
platform: | |
- os: ubuntu-22.04 | |
arch: amd64 | |
- os: macos-12 | |
arch: amd64 | |
- os: windows-2022 | |
arch: amd64 | |
- os: macos-14 | |
arch: arm64 | |
go-version: | |
- "1.22" # Current Go version | |
- "1.20" # Floor Go version of zipkin-go (current - 2) | |
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-version }} | |
- name: Lint files | |
# TODO: update lint fixes in a separate PR | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | |
version: latest | |
- name: Run tests | |
run: go test -coverprofile coverage.txt -v ./... | |
env: | |
CGO_ENABLED: 1 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
name: zipkin-go test reports | |
fail_ci_if_error: false | |
files: ./coverage.txt |