Chore/add notice file #160
Workflow file for this run
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| code: | |
| - '!**.md' | |
| - '!docs/**' | |
| - '!LICENSE' | |
| - '!.gitignore' | |
| - uses: actions/setup-go@v5 | |
| if: steps.filter.outputs.code == 'true' | |
| with: | |
| go-version: '1.25.5' | |
| - name: Build with version info | |
| if: steps.filter.outputs.code == 'true' | |
| run: | | |
| VERSION=$(cat VERSION) | |
| GIT_HASH=$(git rev-parse --short HEAD) | |
| BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) | |
| go build -ldflags "-s -w \ | |
| -X github.com/soapbucket/sbproxy/internal/version.Version=${VERSION} \ | |
| -X github.com/soapbucket/sbproxy/internal/version.BuildHash=${GIT_HASH} \ | |
| -X github.com/soapbucket/sbproxy/internal/version.BuildDate=${BUILD_DATE}" \ | |
| ./... | |
| - name: Vet | |
| if: steps.filter.outputs.code == 'true' | |
| run: go vet ./... | |
| - name: Test | |
| if: steps.filter.outputs.code == 'true' | |
| run: go test ./... -count=1 -timeout 300s -race | |
| - name: Install and run golangci-lint | |
| if: steps.filter.outputs.code == 'true' | |
| run: | | |
| go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
| golangci-lint run ./... | |
| - name: Check | |
| if: steps.filter.outputs.code == 'true' | |
| run: make check |