nextcloud-spreed-signaling/.github/workflows/lint.yml

55 lines
1.4 KiB
YAML
Raw Normal View History

2020-07-31 14:14:34 +02:00
name: lint
on:
push:
branches: [ master ]
paths:
- '.github/workflows/lint.yml'
- '**.go'
- 'go.*'
2020-07-31 14:14:34 +02:00
pull_request:
branches: [ master ]
paths:
- '.github/workflows/lint.yml'
- '**.go'
- 'go.*'
2020-07-31 14:14:34 +02:00
jobs:
lint:
name: golang
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.17"
2022-04-05 10:32:03 +02:00
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "::set-output name=go-version::$(go version | cut -d ' ' -f 3)"
- name: Go build cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-build-${{ hashFiles('**/go.mod', '**/go.sum') }}
- name: Go mod cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-mod-${{ hashFiles('**/go.mod', '**/go.sum') }}
2020-07-31 14:14:34 +02:00
- name: Install dependencies
run: |
2022-06-21 16:04:40 +02:00
sudo apt -y update && sudo apt -y install protobuf-compiler
2020-07-31 14:14:34 +02:00
make common
- name: lint
uses: golangci/golangci-lint-action@v3.3.1
2020-07-31 14:14:34 +02:00
with:
version: latest