diff --git a/.github/actions/go-test/action.yml b/.github/actions/go-test/action.yml index e7042fc..0e713ef 100644 --- a/.github/actions/go-test/action.yml +++ b/.github/actions/go-test/action.yml @@ -10,6 +10,10 @@ inputs: description: "Working directory" required: false default: "." + build-tags: + description: "Build tags to pass to go test (e.g., 'fts5')" + required: false + default: "" runs: using: "composite" @@ -24,4 +28,10 @@ runs: working-directory: ${{ inputs.working-directory }} env: CGO_ENABLED: 1 - run: go test -race -v ./... + run: | + TAGS="${{ inputs.build-tags }}" + if [ -n "$TAGS" ]; then + go test -tags "$TAGS" -race -v ./... + else + go test -race -v ./... + fi diff --git a/.github/workflows/go-pr.yaml b/.github/workflows/go-pr.yaml index 8d46d1a..4aa4f54 100644 --- a/.github/workflows/go-pr.yaml +++ b/.github/workflows/go-pr.yaml @@ -18,6 +18,11 @@ on: required: false type: boolean default: false + build-tags: + description: "Build tags to pass to go test (e.g., 'fts5')" + required: false + type: string + default: "" # Caller must declare these permissions: # permissions: @@ -253,8 +258,15 @@ jobs: cache: true - name: Run tests with coverage + env: + CGO_ENABLED: 1 run: | - go test -race -coverprofile=coverage.out -covermode=atomic ./... + TAGS="${{ inputs.build-tags }}" + if [ -n "$TAGS" ]; then + go test -tags "$TAGS" -race -coverprofile=coverage.out -covermode=atomic ./... + else + go test -race -coverprofile=coverage.out -covermode=atomic ./... + fi go tool cover -func=coverage.out -o=coverage.txt - name: Calculate coverage diff --git a/.github/workflows/go-release-cgo.yaml b/.github/workflows/go-release-cgo.yaml index 07a7de8..6c52e03 100644 --- a/.github/workflows/go-release-cgo.yaml +++ b/.github/workflows/go-release-cgo.yaml @@ -91,6 +91,7 @@ jobs: uses: lukaszraczylo/shared-actions/.github/actions/go-test@main with: go-version: ${{ inputs.go-version }} + build-tags: "fts5" frontend: name: Build Frontend