-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
29 lines (28 loc) · 970 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
kind: pipeline
type: docker
name: default
steps:
- name: build
image: registry.gitlab.com/fun-tech/fundraising-frontend-docker:latest
environment:
COMPOSER_CACHE_DIR: /composer_cache
GITHUB_TOKEN:
from_secret: github_token
volumes:
- name: cache
path: /composer_cache
commands:
# Environment setup
- echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
- composer config -g github-oauth.github.com "$GITHUB_TOKEN"
- composer install --prefer-dist --no-progress --no-interaction
# CI
- vendor/bin/phpcs
- php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-clover coverage.xml
- php -d memory_limit=1G vendor/bin/phpstan analyse --level=9 --no-progress src/ tests/
# Upload coverage to Scrutinizer
- ocular code-coverage:upload --no-interaction --format=php-clover coverage.xml
volumes:
- name: cache
host:
path: /tmp/drone/cache