gpt4 book ai didi

travis-ci - {before_,}{install,script} .travis.yml 选项之间有什么区别?

转载 作者:行者123 更新时间:2023-12-03 05:19:36 27 4
gpt4 key购买 nike

.travis.yml配置文件中,before_installinstallbefore_script之间的实际区别是什么和脚本选项?

我没有找到任何文档来解释这些选项之间的差异。

最佳答案

您不需要使用这些部分,但如果您这样做,您就传达了您正在做的事情的意图:

before_install:
# execute all of the commands which need to be executed
# before installing dependencies
- composer self-update
- composer validate

install:
# install all of the dependencies you need here
- composer install --prefer-dist

before_script:
# execute all of the commands which need to be executed
# before running actual tests
- mysql -u root -e 'CREATE DATABASE test'
- bin/doctrine-migrations migrations:migrate

script:
# execute all of the commands which
# should make the build pass or fail
- vendor/bin/phpunit
- vendor/bin/php-cs-fixer fix --verbose --diff --dry-run

例如,参见 https://github.com/localheinz/composer-normalize/blob/0.8.0/.travis.yml .

关于travis-ci - {before_,}{install,script} .travis.yml 选项之间有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34377017/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com