Skip to content

Fix mnd still existing #221

Fix mnd still existing

Fix mnd still existing #221

Workflow file for this run

name: go-checks
on:
workflow_call:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
- name: Setup Go environment
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@v5
with:
go-version: '1.23'
check-latest: true
- name: Run Vulncheck
if: matrix.os == 'ubuntu-latest'
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
- name: Download linter config
if: matrix.os == 'ubuntu-latest'
run: curl -fsS -o .golangci.yml https://raw.githubusercontent.com/fortio/workflows/main/golangci.yml
- name: Run golangci-lint
if: matrix.os == 'ubuntu-latest'
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # pin@v6
with:
version: v1.61.0
- name: Install Git Bash
run: |
choco install git
echo "Git Bash installed"
shell: pwsh
if: runner.os == 'Windows'
- name: Run tests
run: |
go version
go run . buildinfo || true # to also confirm go toolchain version used
if make -n test &>/dev/null; then
echo "Running tests with make test"
make test
else
echo "No Makefile test target, running tests with race detection as default behavior"
go test -race ./...
fi
shell: bash # to use bash on Windows