-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.yml
34 lines (34 loc) · 1.23 KB
/
config.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
30
31
32
33
34
version: 2
jobs:
build:
working_directory: /var/www/html
docker:
- image: php:7.4-apache
environment:
APP_ENV: test
steps:
- run:
name: Install system packages
command: apt-get update && apt-get -y install git
- run:
name: Install PHP extensions
command: docker-php-ext-install pdo
- checkout
- run:
name: Install Composer
command: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer invalid'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- run:
name: Display PHP information
command: |
php -v
php composer.phar --version
- run:
name: Install project dependencies
command: php composer.phar install
- run:
name: Run CS tests
command: php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.3-