Run golangci in server CI (#23240)

* Run golangci in server CI

Also reordered the checks in check-style target to run vet check
first which has far better error messages in case of unsynced branch failures.
```release-note
NONE
```
This commit is contained in:
Agniva De Sarker
2023-05-04 19:37:30 +05:30
committed by GitHub
parent 76ad948b80
commit 349e5d4573
2 changed files with 22 additions and 3 deletions

View File

@@ -87,6 +87,26 @@ jobs:
run: make plugin-checker
- name: Run mattermost-vet
run: make vet BUILD_NUMBER='${GITHUB_HEAD_REF}' MM_NO_ENTERPRISE_LINT=true MM_VET_OPENSPEC_PATH='${PWD}/../../mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml'
golangci:
name: golangci-lint
runs-on: ubuntu-22.04
defaults:
run:
working-directory: server
steps:
- name: Checkout mattermost-server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ env.go-version }}
cache-dependency-path: server/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
working-directory: server
args: --new-from-rev=HEAD~ --whole-files # This only checks the latest commit for speed.
check-migrations:
name: Check migration files
runs-on: ubuntu-22.04