Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One golangci-lint workflow #6567

Merged
merged 1 commit into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/build-ui-and-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,6 @@ on:
default: "warning"

jobs:
golangci:
name: golangci-lint
if: github.repository == 'meshery/meshery'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@master
with:
check-latest: "true"
go-version: "1.19"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --disable-all -E revive -E gosec -E errcheck -E nilerr -E govet -E gofmt -E goimports -E staticcheck

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
build-backend:
name: Backend build
if: github.repository == 'meshery/meshery'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Golangci-Lint CI Workflow
on:
push:
branches:
- "master"
paths:
- "**.go"
pull_request:
branches:
- "master"
permissions:
contents: read

jobs:
golangci:
strategy:
matrix:
go: [1.19]
os: [ubuntu-latest]
name: golangci-lint
if: github.repository == 'meshery/meshery'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 3m --verbose