Skip to content

Add golangci-lint to GHA #175

Add golangci-lint to GHA

Add golangci-lint to GHA #175

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
docker-compose up -d minio db redis &&
docker-compose up -d cworker conductor &&
docker-compose up minio-prepare
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
ffmpeg-version: "6.1.0"
- name: Run tests
run: go test -covermode=count -coverprofile=coverage.out ./...
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.56