Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure compatibility testing workflow to depend on stable job #3768

Closed
MrAlias opened this issue Feb 23, 2023 · 0 comments · Fixed by #3779
Closed

Restructure compatibility testing workflow to depend on stable job #3768

MrAlias opened this issue Feb 23, 2023 · 0 comments · Fixed by #3779
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed pkg:tooling Related to the tooling package
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Feb 23, 2023

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.

@MrAlias MrAlias added help wanted Extra attention is needed good first issue Good for newcomers pkg:tooling Related to the tooling package labels Feb 23, 2023
@pellared pellared self-assigned this Feb 24, 2023
@XSAM XSAM added this to the untracked milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed pkg:tooling Related to the tooling package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants