Merge pull request #290 from nxtrace/main #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/*.go" | |
- "go.mod" | |
- "go.sum" | |
- ".github/workflows/*.yml" | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "**/*.go" | |
- "go.mod" | |
- "go.sum" | |
- ".github/workflows/*.yml" | |
workflow_dispatch: | |
jobs: | |
test: | |
permissions: | |
contents: read | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Test with unix | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: sudo go test -v -ldflags=-checklinkname=0 -coverprofile='coverage.out' -covermode=count ./... | |
- name: Test with windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: go test -v -ldflags=-checklinkname=0 -coverprofile='coverage.out' -covermode=count ./... |