composer require hiqdev/hidev-travis
.hidev.yml or hidev.yml config file with Travis-specific actions.Generate a basic .hidev.yml to integrate Travis CI:
# .hidev.yml
travis:
install:
- composer install
script:
- hidev test
after_success:
- ./deploy.sh
hidev.yml (your primary configuration file for HiDev + Travis)Travis CI Actions
Use the travis key in hidev.yml to define Travis-specific stages:
travis:
before_install:
- wget https://getcomposer.org/composer.phar
install:
- php composer.phar install --prefer-dist --no-interaction
script:
- hidev test
- hidev lint
after_success:
- ./generate-coverage.sh
Conditional Execution
Leverage HiDev’s @if directives to conditionally run Travis actions:
tasks:
test:
cmd: hidev test
travis: "@if env(TRAVIS) == true"
Badge Generation
Use markdownBadges to auto-generate Travis CI badges in your README.md:
travis:
markdownBadges: true
HiDev Task Integration Combine HiDev tasks with Travis stages:
tasks:
deploy:
cmd: ./deploy.sh
travis: "after_success"
.travis.yml: While this plugin allows defining Travis actions in hidev.yml, you can still maintain a .travis.yml for backward compatibility or additional Travis-specific configurations.env() in HiDev to dynamically set Travis environment variables:
travis:
env:
global:
- secure: "ENCRYPTED_VAR"
Deprecated before_install Processing
before_install automatically, but newer versions require explicit .travis.yml usage. Ensure you’re not relying on legacy behavior.HiDev Version Compatibility
hidev.phar is up-to-date:
wget https://github.com/hiqdev/hidev/releases/latest/download/hidev.phar
chmod +x hidev.phar
Travis Matrix Conflicts
matrix.include in .travis.yml, ensure HiDev tasks are compatible with all matrix configurations. Test locally with:
hidev test --env TRAVIS=true
Caching Issues
vendor/ by default. If HiDev tasks depend on external assets, explicitly cache them in .travis.yml:
cache:
directories:
- vendor
- $HOME/.cache/composer
--dry-run to preview HiDev + Travis execution:
hidev travis --dry-run
hidev:
debug: true
Custom Config Files Override default behavior by specifying a custom config file:
hidev travis --config=custom-hidev.yml
Plugin Hooks Extend the plugin by creating a custom HiDev plugin that hooks into Travis actions. Example:
// CustomHiDevPlugin.php
namespace App\HiDev;
use HiQDev\HiDev\Plugin\PluginInterface;
class CustomHiDevPlugin implements PluginInterface {
public function getConfig() {
return [
'travis' => [
'customAction' => 'echo "Custom Travis Action"',
],
];
}
}
Badge Customization
Modify badge generation by extending the markdownBadges logic in your hidev.yml:
travis:
markdownBadges:
- name: "Custom Badge"
url: "https://custom-badge-service.com"
.hidev.yml or hidev.yml (case-sensitive on some systems).hidev.yml to avoid parsing errors.after_success/after_failure hooks, as Travis may throttle requests.How can I help you explore Laravel packages today?