Files
NTrace-core/.github/workflows/test.yml
tsosunchia 69588b0d14 更新Golang到v1.23,此处需注意之后版本编译时需要加"-ldflags=-checklinkname=0"参数
修改:     .cross_compile.sh
	修改:     .github/workflows/build.yml
	修改:     .github/workflows/test.yml
	修改:     README.md
	修改:     README_zh_CN.md
	修改:     go.mod
	修改:     go.sum
2025-01-11 23:09:27 +08:00

43 lines
1.0 KiB
YAML

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 ./...