docs: 更新 README 添加路径参数功能说明 #92
This file contains hidden or 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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.22.1' | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Benchmark | |
| run: go test -race -run=^$ -bench=. -benchmem ./... | |
| - name: Test | |
| run: go test -v -race -coverprofile=coverage.txt ./... && go tool cover -html=coverage.txt -o coverage.html | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| # 注意:对于公开仓库,token 参数是可选的,可以省略 | |
| # 对于私有仓库,需要添加 token 参数并在 GitHub 仓库设置中配置相应的 secret |