-
Notifications
You must be signed in to change notification settings - Fork 38
ci: run the test suite with the shipping build tags #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: CI | ||
|
|
||
| # Run the Go test suite with the SHIPPING build tags on every PR and push to | ||
| # main, so what we test is what we ship. The duckdb_arrow tag is mandatory — | ||
| # the DuckDB driver gates its Arrow CGO API behind it (see issue #490), so a | ||
| # bare `go test` does not compile the Arrow path. Both shipped variants are | ||
| # covered: standard (-tags=duckdb_arrow) and FIPS (-tags=duckdb_arrow,fips, | ||
| # GOFIPS140), mirroring the build-binaries matrix in release-build.yml. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test (${{ matrix.variant }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - variant: standard | ||
| build_tags: duckdb_arrow | ||
| gofips: "" | ||
| - variant: fips | ||
| build_tags: duckdb_arrow,fips | ||
| gofips: "v1.0.0" | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: '1.26.4' | ||
| cache: true | ||
|
|
||
| # vet only on the standard variant (vet findings are tag-independent; | ||
| # running once avoids duplicate annotations). No gofmt gate: Go 1.26's | ||
| # gofmt rewrites doc-comment content (e.g. mangles the `'it''s'` SQL-escape | ||
| # example in internal/sql/mask.go), so enforcing it in CI would propagate | ||
| # comment corruption. Format is left to local tooling / review. | ||
| - name: go vet | ||
| if: matrix.variant == 'standard' | ||
| env: | ||
| CGO_ENABLED: 1 | ||
| run: go vet -tags=duckdb_arrow ./... | ||
|
|
||
| # No -race: bcrypt-based auth tests hard-code 1000ms request timeouts that | ||
| # the race detector's CPU overhead blows past (not real races — the suite | ||
| # is race-clean). The #490 goal is tag-correct coverage (test == ship), | ||
| # which -race is orthogonal to. Race coverage can be added later behind a | ||
| # carve-out for the timeout-sensitive auth/api packages. | ||
| - name: go test | ||
| env: | ||
| CGO_ENABLED: 1 | ||
| GOFIPS140: ${{ matrix.gofips }} | ||
| run: go test -tags=${{ matrix.build_tags }} ./... |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newly added paragraph contains a very long, run-on sentence that describes the previous state of the CI workflow and the compilation behavior of
go test. Splitting this into two sentences would significantly improve the readability and flow of the release notes.\n\nFor example:\n\nmarkdown\n**CI now runs the test suite against the shipped build.** A new `CI` workflow runs `go test` on every pull request and push to `main` with the same build tags the release uses — `duckdb_arrow` (standard) and `duckdb_arrow,fips` with `GOFIPS140=v1.0.0` (FIPS variant) — plus `go vet`. Previously, the only workflow built and signed binaries but ran no tests. Additionally, a bare `go test` (without `-tags=duckdb_arrow`) does not compile the Arrow query path because the DuckDB driver gates its Arrow API behind that tag, meaning automated testing of the code that actually ships was missing. This closes that gap; what CI tests is now what the release builds. (Issue #490, which proposed dropping the tag, was closed: the tag is required by the driver and cannot be removed without a driver change.)\n