String to include in the cache key, in addition to the default, which is runner.os. The action itself requires at least Go 1.16. The latest release of Staticcheck works with the last two minor releases of Go. If your job already installs Go prior to running Staticcheck, for example to run unit tests, it is best to set this option to false. If Staticcheck is the only action in your job, this option can usually be left on its default value of true. Whether the action should install a suitable version of Go to install and run Staticcheck. Go build tags that get passed to Staticcheck via the -tags flag. If unset, this will default to the Go version specified in your go.mod. This affects the diagnostics reported by Staticcheck,Īvoiding suggestions that are not applicable to older versions of Go. It defaults to latest, which installs the latest released version of Staticcheck. It is recommended to pin to a specific version and to update Staticheck consciously. Options versionīecause new versions of Staticcheck introduce new checks that may break your build, When installing Go, make sure the version meets Staticcheck’s minimum requirements.Ī given Staticcheck release supports the last two versions of Go (such as Go 1.16 and Go 1.17) at the time of release. by using actions/setup-go or WillAbides/setup-go-faster),Īnd save and restore the Go build cache, for improved performance. This is intended for trivial jobs that only run Staticcheck, not other steps such as go test.įor more complicated jobs, it is strongly recommended that you set install-go to false, It also saves and restores Go’s build cache (in addition to Staticcheck’s own cache) to speed up future runs. Managing Goīy default, staticcheck-action installs Go so that it can install and run Staticcheck. Note that this example could benefit from further improvements, such as caching of Go’s build cache. Name : "CI" on : jobs : ci : name : "Run CI" strategy : fail-fast : false matrix : os : go : runs-on : $
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |