mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-25 10:02:11 +02:00
0f043a4ba9
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
59 lines
1.5 KiB
YAML
59 lines
1.5 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.*'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
name: golang
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
|
|
- id: go-cache-paths
|
|
run: |
|
|
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
|
|
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
|
|
echo "go-version=$(go version | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT
|
|
|
|
- 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.7.0
|
|
with:
|
|
version: latest
|
|
args: --timeout=2m0s
|