Skip to content

Run verify --tests in CI#644

Open
jamillambert wants to merge 2 commits into
rust-bitcoin:masterfrom
jamillambert:0622-verify-tests-CI
Open

Run verify --tests in CI#644
jamillambert wants to merge 2 commits into
rust-bitcoin:masterfrom
jamillambert:0622-verify-tests-CI

Conversation

@jamillambert

Copy link
Copy Markdown
Collaborator

Fix the two problems highlighted when adding verify --tests to CI:
submitpackage is untested for v26 - Add UNTESTED label to the types table.
abortprivatebroadcast test did not check the model - Fix the test.

Add verify --tests to CI:
For every version integration_tests capture the output and run verify --tests with the output generated. Run in the same job as the tests since they are needed to generate the file.

Closes #639

Adding verify --tests to CI runs it on all versions.
This highlighted 2 missed problems:
submitpackage is untested for v26 - Add `UNTESTED` label to the types
table.
abortprivatebroadcast test did not check the model - Fix the test.
@jamillambert

Copy link
Copy Markdown
Collaborator Author

I left in the existing verify job even though it's run again in integration_tests because it's fast and will fail quickly if there is another issue that verify catches. The additional check added by this PR is a check on the integration tests so fits within the title of that job.

@satsfy satsfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looking good aside from one CI difficulty.

BITCOIND_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/corepc/bitcoind
run: cd integration_test && cargo test --features=${{ matrix.version }},download
run: |
test_output="${{ runner.temp }}/integration-test-${{ matrix.version }}.out"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a test CI run on my branch, failing the new integration test with assert!(false). The test does not fail on the integration test; it keeps going to verify, which fails loudly because all subsequent outputs after the failed integration test were not produced and did not fail fast so they are all missing at verify time. The solution is simple:

Suggested change
test_output="${{ runner.temp }}/integration-test-${{ matrix.version }}.out"
set -o pipefail
test_output="${{ runner.temp }}/integration-test-${{ matrix.version }}.out"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I added the fix.

For every version integration_tests CI capture the output and run
verify --tests with the output generated. Run in the same job as
the tests since they are needed to generate the file.
@jamillambert jamillambert force-pushed the 0622-verify-tests-CI branch from 7ea4357 to da9f017 Compare June 24, 2026 15:04

@satsfy satsfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK da9f017

Ran the CI again, fails as expected now on the integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run verify --tests in CI?

2 participants