Last active
May 10, 2023 16:46
-
-
Save sawaYch/6e1b6b3c67848090e50800a3e5460e9d to your computer and use it in GitHub Desktop.
Conditional Build in Travis-CI
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
| 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