Skip to content

Bump golangci/golangci-lint-action from 4 to 6 (#112) #174

Bump golangci/golangci-lint-action from 4 to 6 (#112)

Bump golangci/golangci-lint-action from 4 to 6 (#112) #174

Workflow file for this run

name: QA
# QA checks on a regular Github runner, allowing for concurrent runs.
# The tests run on a mock back-end.
on:
pull_request:
workflow_dispatch:
push:
branches: [main]
jobs:
quality:
name: "Quality checks"
# This job ensures the project compiles and the linter passes before commiting
# to the whole Github-Azure-WSL orchestra.
strategy:
matrix:
os: [ubuntu, windows]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Set up Git
shell: bash
run : |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
shell: bash
run: |
go build ./...
- name: Lint with mock back-end
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
args: --build-tags="gowslmock"
- name: Lint with real back-end
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
- name: Test with mocks
shell: bash
run: go test -tags="gowslmock" -shuffle=on
- name: Test with mocks, race flag enabled
# We skip it on Windows because -race depends on Cgo, which is
# complicated to enable (it requires Cygwin, MSVC support is
# broken)
if: ${{ matrix.os }} == "ubuntu"
shell: bash
run: go test -tags="gowslmock" -shuffle=on -race