2021-12-30 13:51:35 +01:00
|
|
|
skip_clone: true
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
clone_friendica_base:
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git clone https://github.com/friendica/friendica.git .
|
|
|
|
- git checkout $CI_COMMIT_BRANCH
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
clone_friendica_addon:
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git clone $CI_REPO_LINK addon
|
|
|
|
- cd addon/
|
|
|
|
- git checkout $CI_COMMIT_BRANCH
|
|
|
|
- git fetch origin $CI_COMMIT_REF
|
|
|
|
- git merge $CI_COMMIT_SHA
|
|
|
|
when:
|
|
|
|
event: pull_request
|
2021-12-30 19:26:35 +01:00
|
|
|
restore_cache:
|
|
|
|
image: meltwater/drone-cache:dev
|
|
|
|
settings:
|
|
|
|
backend: "filesystem"
|
|
|
|
restore: true
|
|
|
|
cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
|
|
|
|
archive_format: "gzip"
|
|
|
|
mount:
|
|
|
|
- '.composer'
|
|
|
|
volumes:
|
|
|
|
- /tmp/drone-cache:/tmp/cache
|
|
|
|
when:
|
|
|
|
event: pull_request
|
2021-12-30 13:51:35 +01:00
|
|
|
composer_install:
|
|
|
|
image: composer
|
|
|
|
commands:
|
2021-12-30 19:26:35 +01:00
|
|
|
- export COMPOSER_HOME=.composer
|
2021-12-30 13:51:35 +01:00
|
|
|
- ./bin/composer.phar run cs:install
|
|
|
|
when:
|
|
|
|
event: pull_request
|
2021-12-30 19:26:35 +01:00
|
|
|
rebuild_cache:
|
|
|
|
image: meltwater/drone-cache:dev
|
|
|
|
settings:
|
|
|
|
backend: "filesystem"
|
|
|
|
rebuild: true
|
|
|
|
cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
|
|
|
|
archive_format: "gzip"
|
|
|
|
mount:
|
|
|
|
- '.composer'
|
|
|
|
volumes:
|
|
|
|
- /tmp/drone-cache:/tmp/cache
|
|
|
|
when:
|
|
|
|
event: pull_request
|
2021-12-30 13:51:35 +01:00
|
|
|
check:
|
|
|
|
image: friendicaci/php-cs
|
|
|
|
commands:
|
|
|
|
- cd addon/
|
|
|
|
- export CHANGED_FILES="$(git diff --name-status ${CI_PREV_COMMIT_SHA}..${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")"
|
|
|
|
- cd ../
|
|
|
|
- /check-php-cs.sh
|
|
|
|
when:
|
|
|
|
event: pull_request
|