]> git.mxchange.org Git - friendica-addons.git/blob - .woodpecker/.code_standards_check.yml
„audon/messages.po“ löschen
[friendica-addons.git] / .woodpecker / .code_standards_check.yml
1 skip_clone: true
2
3 pipeline:
4   clone_friendica_base:
5     image: alpine/git
6     commands:
7       - git clone https://github.com/friendica/friendica.git .
8       - git checkout $CI_COMMIT_BRANCH
9     when:
10       event: pull_request
11   clone_friendica_addon:
12     image: alpine/git
13     commands:
14       - git config --global user.email "no-reply@friendi.ca"
15       - git config --global user.name "Friendica"
16       - git clone $CI_REPO_LINK addon
17       - cd addon/
18       - git checkout $CI_COMMIT_BRANCH
19       - git fetch origin $CI_COMMIT_REF
20       - git merge $CI_COMMIT_SHA
21     when:
22       event: pull_request
23   restore_cache:
24     image: meltwater/drone-cache:dev
25     settings:
26       backend: "filesystem"
27       restore: true
28       cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
29       archive_format: "gzip"
30       mount:
31         - '.composer'
32     volumes:
33       - /tmp/drone-cache:/tmp/cache
34     when:
35       event: pull_request
36   composer_install:
37     image: composer
38     commands:
39       - export COMPOSER_HOME=.composer
40       - ./bin/composer.phar run cs:install
41     when:
42       event: pull_request
43   rebuild_cache:
44     image: meltwater/drone-cache:dev
45     settings:
46       backend: "filesystem"
47       rebuild: true
48       cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
49       archive_format: "gzip"
50       mount:
51         - '.composer'
52     volumes:
53       - /tmp/drone-cache:/tmp/cache
54     when:
55       event: pull_request
56   check:
57     image: friendicaci/php-cs
58     commands:
59       - cd addon/
60       - if [ ! -z "$${CI_COMMIT_PULL_REQUEST}" ]; then
61           git fetch --no-tags origin ${CI_COMMIT_TARGET_BRANCH};
62           export CHANGED_FILES="$(git diff --name-status $(git merge-base FETCH_HEAD origin/${CI_COMMIT_TARGET_BRANCH})..${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")";
63         else
64           export CHANGED_FILES="$(git diff --name-status ${CI_COMMIT_SHA} | grep ^A | cut -f2 | sed -e "s/^/addon\\//")";
65         fi
66       - cd ../
67       - /check-php-cs.sh
68     when:
69       event: pull_request