Skip to content

fix linter, update ci (#14) #29

fix linter, update ci (#14)

fix linter, update ci (#14) #29

Workflow file for this run

---
on:
push:
branches:
- main
pull_request:
branches:
- main
name: run tests
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
- name: Run linters
id: lint
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with:
problem-matchers: true
args: --output.sarif.path linter-results.sarif
continue-on-error: true
- name: Upload SARIF to Code Scanning
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
with:
sarif_file: ./linter-results.sarif
if: always()
- name: Run tests
run: go test -v -covermode=count
- name: Check linter status and fail if needed
if: steps.lint.outcome == 'failure'
run: |
echo "Linter found issues. Please fix them before merging."
exit 1