Github Actions: cache modules and only run when necessary (#197)
This PR does two things: - Only run the tests when relevant files change. - Cache the Go Modules directory between runs, so they don't have to redownload everything everytime (go.sum is the cache key). Pretty much straight from the examples: https://github.com/actions/cache/blob/master/examples.md#go---modules
This commit is contained in:
3
.github/workflows/gofmt.yml
vendored
3
.github/workflows/gofmt.yml
vendored
@ -4,6 +4,9 @@ on:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/gofmt.yml'
|
||||
- '**.go'
|
||||
jobs:
|
||||
|
||||
gofmt:
|
||||
|
Reference in New Issue
Block a user