Skip to content

Instantly share code, notes, and snippets.

@abtris
Last active May 23, 2022 09:17
Show Gist options
  • Save abtris/43517fdf3706973a97d1b16f7291a8e4 to your computer and use it in GitHub Desktop.
Save abtris/43517fdf3706973a97d1b16f7291a8e4 to your computer and use it in GitHub Desktop.
Easy use go.mod for Go version in Github Actions introduces in https://github.com/actions/setup-go/releases/tag/v3.1.0
name: Go tests
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
- name: Test
run: go test -v ./...
@abtris
Copy link
Author

abtris commented May 23, 2022

You can use https://github.com/sethvargo/ratchet for improving this more with pin versions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment