dcrd/run_tests.sh
Dave Collins 6d8707a4ba
build: Move lint logic to its own script.
This separates the logic in run_tests.sh that runs all of the linters on
all modules in the repository to a separate lint.sh script and updates
run_tests.sh to call that script instead.  Rather than listing every
linter in the script comments, it refers to the .golangci.yml
configuration file that specifies them now that it exists.

This allows developers to more easily selectively run only the linters
without needing to run all of the tests again.

It also cleans up the comments in run_test.sh to match reality while
here.
2023-07-24 12:24:38 -05:00

21 lines
478 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
# This script runs the tests for all packages in all Go modules in the
# repository and then runs the linters for all Go modules in the repository by
# invoking the separate linter script.
go version
# run tests on all modules
echo "==> test all modules"
ROOTPKG=$(go list)
go test -short -tags rpctest $ROOTPKG/...
# run linters on all modules
. ./lint.sh
echo "------------------------------------------"
echo "Tests completed successfully!"