Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] Use PHP 7.4 for behat acceptance test dependencies #38066

Merged
merged 2 commits into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 65 additions & 13 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ def dependencies(ctx):
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
vendorbinCodestyle(phpVersion) +
vendorbinCodesniffer(phpVersion) +
vendorbinPhan(phpVersion) +
vendorbinPhpstan(phpVersion) +
vendorbinBehat() +
yarnInstall(phpVersion) +
cacheRebuildOnEventPush() +
cacheFlushOnEventPush(),
Expand Down Expand Up @@ -442,7 +446,8 @@ def codestyle():
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
vendorbinCodestyle(phpVersion) +
vendorbinCodesniffer(phpVersion) +
yarnInstall(phpVersion) +
[
{
Expand Down Expand Up @@ -618,7 +623,7 @@ def phpstan():
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
vendorbinPhpstan(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, 'sqlite', params['logLevel']) +
[
Expand Down Expand Up @@ -692,7 +697,7 @@ def phan():
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
vendorbinPhan(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, 'sqlite', params['logLevel']) +
[
Expand Down Expand Up @@ -775,7 +780,6 @@ def litmus():
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, db, params['logLevel'], params['useHttps']) +
setupLocalStorage(phpVersion) +
Expand Down Expand Up @@ -943,7 +947,6 @@ def dav():
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, db, params['logLevel']) +
davInstall(phpVersion, scriptPath) +
Expand Down Expand Up @@ -1015,7 +1018,6 @@ def javascript(ctx):
'steps':
cacheRestore() +
composerInstall(params['phpVersion']) +
vendorbinInstall(params['phpVersion']) +
yarnInstall(params['phpVersion']) +
[
{
Expand Down Expand Up @@ -1190,7 +1192,6 @@ def phptests(ctx, testType):
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, db, params['logLevel']) +
installExtraApps(phpVersion, extraAppsDict) +
Expand Down Expand Up @@ -1475,7 +1476,7 @@ def acceptance(ctx):
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
vendorbinBehat() +
yarnInstall(phpVersion) +
installServer(phpVersion, db, params['logLevel'], params['useHttps'], params['federatedServerNeeded'], params['proxyNeeded']) +
(
Expand Down Expand Up @@ -1544,7 +1545,6 @@ def sonarAnalysis(ctx, phpVersion = '7.4'):
'steps':
cacheRestore() +
composerInstall(phpVersion) +
vendorbinInstall(phpVersion) +
yarnInstall(phpVersion) +
installServer(phpVersion, 'sqlite') +
[
Expand Down Expand Up @@ -2017,16 +2017,68 @@ def composerInstall(phpVersion):
]
}]

def vendorbinInstall(phpVersion):
def vendorbinCodestyle(phpVersion):
return [{
'name': 'vendorbin-install',
'name': 'vendorbin-codestyle',
'image': 'owncloudci/php:%s' % phpVersion,
'pull': 'always',
'environment': {
'COMPOSER_HOME': '/drone/src/.cache/composer'
},
'commands': [
'make vendor-bin-deps'
'make vendor-bin-codestyle'
]
}]

def vendorbinCodesniffer(phpVersion):
return [{
'name': 'vendorbin-codesniffer',
'image': 'owncloudci/php:%s' % phpVersion,
'pull': 'always',
'environment': {
'COMPOSER_HOME': '/drone/src/.cache/composer'
},
'commands': [
'make vendor-bin-codesniffer'
]
}]

def vendorbinPhan(phpVersion):
return [{
'name': 'vendorbin-phan',
'image': 'owncloudci/php:%s' % phpVersion,
'pull': 'always',
'environment': {
'COMPOSER_HOME': '/drone/src/.cache/composer'
},
'commands': [
'make vendor-bin-phan'
]
}]

def vendorbinPhpstan(phpVersion):
return [{
'name': 'vendorbin-phpstan',
'image': 'owncloudci/php:%s' % phpVersion,
'pull': 'always',
'environment': {
'COMPOSER_HOME': '/drone/src/.cache/composer'
},
'commands': [
'make vendor-bin-phpstan'
]
}]

def vendorbinBehat():
return [{
'name': 'vendorbin-behat',
'image': 'owncloudci/php:7.4',
'pull': 'always',
'environment': {
'COMPOSER_HOME': '/drone/src/.cache/composer'
},
'commands': [
'make vendor-bin-behat'
]
}]

Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,21 @@ vendor/bamarni/composer-bin-plugin: composer.lock
.PHONY: vendor-bin-deps
vendor-bin-deps: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor vendor-bin/phan/vendor vendor-bin/phpstan/vendor vendor-bin/behat/vendor

.PHONY: vendor-bin-codestyle
vendor-bin-codestyle: vendor-bin/owncloud-codestyle/vendor

.PHONY: vendor-bin-codesniffer
vendor-bin-codesniffer: vendor-bin/php_codesniffer/vendor

.PHONY: vendor-bin-phan
vendor-bin-phan: vendor-bin/phan/vendor

.PHONY: vendor-bin-phpstan
vendor-bin-phpstan: vendor-bin/phpstan/vendor

.PHONY: vendor-bin-behat
vendor-bin-behat: vendor-bin/behat/vendor

vendor-bin/owncloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/owncloud-codestyle/composer.lock
composer bin owncloud-codestyle install --no-progress

Expand Down