Currently the compatibility CI testing defined with the version of Go it is testing against in its name.
|
compatibility-test: |
|
strategy: |
|
matrix: |
|
go-version: ["1.20", 1.19, 1.18] |
|
os: [ubuntu-latest, macos-latest, windows-latest] |
|
# GitHub Actions does not support arm* architectures on default |
|
# runners. It is possible to acomplish this with a self-hosted runner |
|
# if we want to add this in the future: |
|
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow |
|
arch: ["386", amd64] |
|
exclude: |
|
# Not a supported Go OS/architecture. |
|
- os: macos-latest |
|
arch: "386" |
|
runs-on: ${{ matrix.os }} |
|
steps: |
|
- name: Install Go |
|
uses: actions/setup-go@v3 |
|
with: |
|
go-version: ${{ matrix.go-version }} |
|
- name: Checkout code |
|
uses: actions/checkout@v3 |
|
- name: Setup Environment |
|
run: | |
|
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV |
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH |
|
shell: bash |
|
- name: Module cache |
|
uses: actions/cache@v3 |
|
env: |
|
cache-name: go-mod-cache |
|
with: |
|
path: ~/go/pkg/mod |
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} |
|
- name: Run tests |
|
env: |
|
GOARCH: ${{ matrix.arch }} |
|
run: make test-short |
This is needed to clearly identify what is being testing in the job.
However, our PRs are setup to require these jobs to pass and when we bump our supported Go versions we then need to request community access to update this requirement.
Instead, we could use the needs directive for a token job that follows all the compatibility testing jobs and require that job to succeed. That way if any of the compatibility tests fail the token job will also fail but the token job will remain "stable" from the perspectives of PR required checks.
Currently the compatibility CI testing defined with the version of Go it is testing against in its name.
opentelemetry-go/.github/workflows/ci.yml
Lines 115 to 152 in 69d0946
This is needed to clearly identify what is being testing in the job.
However, our PRs are setup to require these jobs to pass and when we bump our supported Go versions we then need to request community access to update this requirement.
Instead, we could use the
needsdirective for a token job that follows all the compatibility testing jobs and require that job to succeed. That way if any of the compatibility tests fail the token job will also fail but the token job will remain "stable" from the perspectives of PR required checks.