Skip to content

Merge pull request #22 from soapbucket/chore/add-notice-file #156

Merge pull request #22 from soapbucket/chore/add-notice-file

Merge pull request #22 from soapbucket/chore/add-notice-file #156

Workflow file for this run

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