mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-17 05:06:14 +02:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: lint
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/lint.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/lint.yml'
|
|
- '**.go'
|
|
- 'go.*'
|
|
|
|
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"
|
|
|
|
- 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') }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt -y update && sudo apt -y install protobuf-compiler
|
|
make common
|
|
|
|
- name: lint
|
|
uses: golangci/golangci-lint-action@v3.2.0
|
|
with:
|
|
version: latest
|