2021-07-14 15:36:18 +02:00
|
|
|
name: golangci-lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-09-30 21:09:38 +02:00
|
|
|
branches: [ main, release-** ]
|
2021-07-14 15:36:18 +02:00
|
|
|
pull_request:
|
2021-10-01 16:24:21 +02:00
|
|
|
branches: [ main, release-** ]
|
2022-04-20 03:18:47 +02:00
|
|
|
workflow_dispatch:
|
2021-07-14 15:36:18 +02:00
|
|
|
|
2022-07-25 16:01:29 +02:00
|
|
|
env:
|
|
|
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
|
|
|
|
2021-07-14 15:36:18 +02:00
|
|
|
jobs:
|
|
|
|
golangci:
|
2022-04-20 03:18:47 +02:00
|
|
|
name: plugin
|
2021-07-14 15:36:18 +02:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
2022-04-20 03:18:47 +02:00
|
|
|
- uses: actions/setup-go@v3
|
2021-07-14 15:36:18 +02:00
|
|
|
with:
|
2022-04-20 03:18:47 +02:00
|
|
|
go-version: 1.18.1
|
|
|
|
- uses: actions/checkout@v3
|
2022-07-25 16:01:29 +02:00
|
|
|
with:
|
|
|
|
path: "focalboard"
|
|
|
|
- id: "mattermostServer"
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
repository: "mattermost/mattermost-server"
|
2022-07-26 10:28:58 +02:00
|
|
|
fetch-depth: "20"
|
2022-07-25 16:01:29 +02:00
|
|
|
path: "mattermost-server"
|
|
|
|
ref: ${{ env.BRANCH_NAME }}
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
if: steps.mattermostServer.outcome == 'failure'
|
|
|
|
with:
|
|
|
|
repository: "mattermost/mattermost-server"
|
2022-07-26 10:29:08 +02:00
|
|
|
fetch-depth: "20"
|
2022-07-25 16:01:29 +02:00
|
|
|
path: "mattermost-server"
|
|
|
|
ref : "master"
|
2022-04-20 03:18:47 +02:00
|
|
|
- name: set up golangci-lint
|
2022-06-06 10:18:21 +02:00
|
|
|
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
|
2022-04-20 03:18:47 +02:00
|
|
|
- name: lint
|
2022-07-25 16:08:02 +02:00
|
|
|
run: |
|
|
|
|
cd focalboard
|
|
|
|
make server-lint
|