This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
circle.yml
89 lines (71 loc) · 2 KB
/
circle.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: 2
jobs:
build:
docker:
- image: msvrtan/square:0.2.2
- image: postgres:10
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=n0p455
working_directory: /var/www
parallel: 1
steps:
- checkout
- restore_cache:
key: cache-v4-{{ checksum "composer.lock" }}
- run:
name: Setup
command: ./etc/circleci2/setup.sh
- run:
name: Composer install
command: SYMFONY_ENV=test composer install --prefer-dist --no-interaction
- run:
name: Set up the test database
command: ./vendor/bin/phing refresh-test-db
- run:
name: PHPSpec
command: ./vendor/bin/phpspec run
- run:
name: PHPUnit
command: ./vendor/bin/phpunit
- run: chmod 777 -R var/cache var/log
- run:
name: Behat
command: ./vendor/bin/behat
- save_cache:
key: cache-v4-{{ checksum "composer.lock" }}
paths:
- /var/www/vendor
- run:
name: Ship codecoverage to codecov.io
command: bash <(curl -s https://codecov.io/bash)
code_quality:
docker:
- image: msvrtan/square:0.2.2
working_directory: /var/www
parallel: 1
steps:
- checkout
- restore_cache:
key: cache-v4-{{ checksum "composer.lock" }}
- run:
name: Disable xdebug
command: ./etc/circleci2/disable-xdebug.sh
- run:
name: Composer install
command: SYMFONY_ENV=test composer install --prefer-dist --no-interaction
- run:
name: Lint all PHP code files
command: find src/ -type f -name "*.php" -print0 | xargs -0 -n1 php -l
- run:
name: PHPStan
command: ./vendor/bin/phing phpstan
- run:
name: Code standards
command: ./vendor/bin/phing check-codestandards
workflows:
version: 2
build-and-deploy:
jobs:
- build
- code_quality