Skip to content

Instantly share code, notes, and snippets.

@sawaYch
Last active May 10, 2023 16:46
Show Gist options
  • Select an option

  • Save sawaYch/6e1b6b3c67848090e50800a3e5460e9d to your computer and use it in GitHub Desktop.

Select an option

Save sawaYch/6e1b6b3c67848090e50800a3e5460e9d to your computer and use it in GitHub Desktop.
Conditional Build in Travis-CI
matrix:
include:
# config for PHP, server side codebase
- language: php
php:
- 7.0
# deploy jobs here
install:
- cd backend_server && composer install
# unit test jobs here
script: cd ./application/tests && ../../vendor/bin/phpunit --coverage-html ./report --coverage-clover ./report/clover/clover.xml \
&& ../../vendor/bin/php-coverage-badger ../../report/clover/clover.xml ../../misc/coverage.svg
if: branch in (master, backend_dev)
# config for node.js
- language: node_js
node_js:
- '10'
sudo: false
branches:
only:
- master
cache:
directories:
- client/node_modules
before_install:
- cd client && npm update
install:
- npm install
script:
- npm test -- --coverage
- npm run test:badges
if: branch in (master, client_dev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment