Run golangci-lint with the make lint-go target, adjust workflows (#1778)

This commit is contained in:
Martin Angers
2021-08-24 15:36:50 -04:00
committed by GitHub
parent e61cb7e0db
commit 80fb3cb145
3 changed files with 9 additions and 22 deletions
-19
View File
@@ -176,22 +176,3 @@ jobs:
run: |
MYSQL_TEST=1 make test-go
lint-go:
strategy:
matrix:
os: [ubuntu-latest]
go-version: ['^1.16.0']
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Code
uses: actions/checkout@v2
- name: Run Go Linting
run: |
make lint-go
+2 -2
View File
@@ -110,7 +110,7 @@ lint-js:
yarn lint
lint-go:
go vet ./...
golangci-lint run
lint: lint-go lint-js
@@ -238,7 +238,7 @@ e2e-setup:
./build/fleetctl user create --context e2e --email=sso_user@example.com --name "SSO user" --sso=true
e2e-serve-core:
FLEET_SOFTWARE_INVENTORY=1 ./build/fleet serve --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
FLEET_SOFTWARE_INVENTORY=1 ./build/fleet serve --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
e2e-serve-basic:
FLEET_SOFTWARE_INVENTORY=1 ./build/fleet serve --dev_license --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
+7 -1
View File
@@ -31,7 +31,13 @@ Check out [the instructions in the `/tools/osquery` directory](../../tools/osque
## Test suite
To execute the basic unit and integration tests, run the following from the root of the repository:
You must install the [`golangci-lint`](https://golangci-lint.run/) command to run `make test[-go]` or `make lint[-go]`, using:
```
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0
```
Make sure it is available in your PATH. To execute the basic unit and integration tests, run the following from the root of the repository:
```
MYSQL_TEST=1 make test