1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00
focalboard/.github/workflows/lint-server.yml
Mattermost Build 4c44a1f8d5
Update ubuntu version to use latest LTS (#4771) (#4774)
(cherry picked from commit c4454cac52)

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
2023-06-09 11:18:43 -06:00

58 lines
1.6 KiB
YAML

name: golangci-lint
on:
push:
branches: [ main, release-** ]
pull_request:
branches: [ main, release-** ]
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
EXCLUDE_ENTERPRISE: true
jobs:
down-migrations:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
path: "focalboard"
- name: assert that down migrations are SELECT 1 scripts
run: |
cd focalboard
echo 'SELECT 1;' > downmigration
for file in server/services/store/sqlstore/migrations/*.down.sql; do diff -Bw downmigration $file; done
golangci:
name: plugin
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.5
- uses: actions/checkout@v3
with:
path: "focalboard"
- id: "mattermostServer"
uses: actions/checkout@v3
continue-on-error: true
with:
repository: "mattermost/mattermost"
fetch-depth: "20"
path: "mattermost"
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v3
if: steps.mattermostServer.outcome == 'failure'
with:
repository: "mattermost/mattermost"
fetch-depth: "20"
path: "mattermost"
ref : "b61c096497ac1f22f64b77afe58d0dd5a72b38f1"
- name: set up golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
- name: lint
run: |
cd focalboard
make server-lint