Skip to content

ci(travis): honor RUN_TESTS flag and add script section (#95)#228

Open
isaaclins wants to merge 1 commit into
Syncleus:masterfrom
isaaclins:fix/bounty-95-run-tests
Open

ci(travis): honor RUN_TESTS flag and add script section (#95)#228
isaaclins wants to merge 1 commit into
Syncleus:masterfrom
isaaclins:fix/bounty-95-run-tests

Conversation

@isaaclins
Copy link
Copy Markdown

Summary

Fixes #95 — Travis was skipping tests inconsistently because matrix entries set RUN_TEST=false while the global env uses RUN_TESTS=true, and there was no explicit script: section.

Changes

  • Rename RUN_TEST=falseRUN_TESTS=false in four matrix rows
  • Add script: that runs mvn test when RUN_TESTS=true, else mvn -DskipTests package
  • Add ./scripts/validate-travis-run-tests.sh + GHA workflow for reviewers

Validation

./scripts/validate-travis-run-tests.sh

Builds on the same approach as #190 with maintainer-visible CI; happy to close if #190 is preferred.

Bounty: /claim #95 on merge ($20 per issue label).

Other OSS: https://buymeacoffee.com/isaaclins

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).
Copilot AI review requested due to automatic review settings May 26, 2026 11:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_TESTRUN_TESTS typos in the Travis build matrix.
  • Adds a gated Travis script: section to run mvn test only when RUN_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty $20] Some unit tests skipped without being ignored on travis

2 participants