Add linter #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write me a workflow that will lint the code with golangci-lint | |
name: lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache: true | |
# Cloning outside of workspace is currently not possible, see https://github.com/actions/checkout/issues/197 | |
# Therefore, we move later | |
# (we need ../reva available due to a replace in the go.mod file) | |
- name: Cloning reva | |
uses: actions/checkout@v4 | |
with: | |
repository: cs3org/reva | |
path: reva | |
- run: mv reva ../reva | |
- name: Go mod tidy | |
run: go mod tidy | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
args: --timeout=5m |