- Rather than manually downloading and invoking golangci-lint, use the GitHub action provided by the developers. - Configure golangci with a config file rather than passing command line args. This enables the same config to be used locally and on CI without introducing duplication. It also allows much more flexibililty in configuration than using CLI args alone.
19 lines
302 B
Bash
Executable File
19 lines
302 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2020-2021 The Decred developers
|
|
# Use of this source code is governed by an ISC
|
|
# license that can be found in the LICENSE file.
|
|
#
|
|
# usage:
|
|
# ./run_tests.sh
|
|
|
|
set -ex
|
|
|
|
go version
|
|
|
|
# run tests
|
|
env GORACE="halt_on_error=1" go test -race ./...
|
|
|
|
# run linter
|
|
golangci-lint run
|