ci(travis): honor RUN_TESTS flag and add script section (#95)#228
Open
isaaclins wants to merge 1 commit into
Open
ci(travis): honor RUN_TESTS flag and add script section (#95)#228isaaclins wants to merge 1 commit into
isaaclins wants to merge 1 commit into
Conversation
Matrix entries used RUN_TEST=false while the global env is RUN_TESTS; Travis had no script: block so skipTests intent was unclear. Adds validate-travis-run-tests.sh and GHA for reviewers. Fixes Syncleus#95 (bounty $20).
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR standardizes the Travis CI RUN_TESTS environment variable usage and adds automated validation to prevent regressions in .travis.yml.
Changes:
- Fixes
RUN_TEST→RUN_TESTStypos in the Travis build matrix. - Adds a gated Travis
script:section to runmvn testonly whenRUN_TESTS=true. - Introduces a validation script and a GitHub Actions workflow to enforce the Travis config expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/validate-travis-run-tests.sh | Adds a Bash validator that checks .travis.yml for expected RUN_TESTS and Maven gating patterns. |
| .travis.yml | Renames matrix env var to RUN_TESTS and introduces a gated script: step for running tests vs packaging. |
| .github/workflows/validate-travis-run-tests.yml | Adds a CI job that runs the validator on PRs/branch pushes touching the Travis config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+9
| echo "==> YAML parse" | ||
| ruby -e 'require "yaml"; YAML.load_file(".travis.yml"); puts "yaml ok"' |
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
Comment on lines
+12
to
+25
| grep -q 'RUN_TESTS=true' .travis.yml | ||
|
|
||
| echo "==> matrix uses RUN_TESTS (not RUN_TEST typo)" | ||
| if grep -q 'RUN_TEST=false' .travis.yml; then | ||
| echo "FAIL: found RUN_TEST=false typo; use RUN_TESTS=false" | ||
| exit 1 | ||
| fi | ||
| grep -q 'RUN_TESTS=false' .travis.yml | ||
|
|
||
| echo "==> script section gates mvn test" | ||
| grep -q '^script:' .travis.yml | ||
| grep -q 'RUN_TESTS' .travis.yml | ||
| grep -q 'mvn test' .travis.yml | ||
| grep -q 'skipTests' .travis.yml |
Comment on lines
+8
to
+25
| echo "==> YAML parse" | ||
| ruby -e 'require "yaml"; YAML.load_file(".travis.yml"); puts "yaml ok"' | ||
|
|
||
| echo "==> global RUN_TESTS default" | ||
| grep -q 'RUN_TESTS=true' .travis.yml | ||
|
|
||
| echo "==> matrix uses RUN_TESTS (not RUN_TEST typo)" | ||
| if grep -q 'RUN_TEST=false' .travis.yml; then | ||
| echo "FAIL: found RUN_TEST=false typo; use RUN_TESTS=false" | ||
| exit 1 | ||
| fi | ||
| grep -q 'RUN_TESTS=false' .travis.yml | ||
|
|
||
| echo "==> script section gates mvn test" | ||
| grep -q '^script:' .travis.yml | ||
| grep -q 'RUN_TESTS' .travis.yml | ||
| grep -q 'mvn test' .travis.yml | ||
| grep -q 'skipTests' .travis.yml |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #95 — Travis was skipping tests inconsistently because matrix entries set
RUN_TEST=falsewhile the global env usesRUN_TESTS=true, and there was no explicitscript:section.Changes
RUN_TEST=false→RUN_TESTS=falsein four matrix rowsscript:that runsmvn testwhenRUN_TESTS=true, elsemvn -DskipTests package./scripts/validate-travis-run-tests.sh+ GHA workflow for reviewersValidation
Builds on the same approach as #190 with maintainer-visible CI; happy to close if #190 is preferred.
Bounty:
/claim #95on merge ($20 per issue label).Other OSS: https://buymeacoffee.com/isaaclins