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

Extend go-version to accept go.mod files #489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

myaaaaaaaaa
Copy link

Description:
Right now, matrix testing ['go.mod', 'stable'] is somewhat awkward since it involves deliberately setting go-version to an empty string:

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go-version: ['', 'stable']

    steps:
    - name: Setup Go
      uses: actions/setup-go@v5
      with:
        go-version: ${{ matrix.go-version }}
        go-version-file: go.mod

This PR makes such a matrix test more straightforward:

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go-version: ['go.mod', 'stable']

    steps:
    - name: Setup Go
      uses: actions/setup-go@v5
      with:
        go-version: ${{ matrix.go-version }}

Related issue:
Fixes #450

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@myaaaaaaaaa myaaaaaaaaa requested a review from a team as a code owner July 7, 2024 17:18
@myaaaaaaaaa myaaaaaaaaa changed the title Extend go-version to accept go.mod files Extend go-version to accept go.mod files Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use version from module and another version in matrix testing
1 participant