Skip to content

Commit 9fb5525

Browse files
authored
Merge pull request #4 from Sweetchuck/upgrade-dependencies
Upgrade dependencies
2 parents 191fe04 + c89239d commit 9fb5525

16 files changed

+1691
-1292
lines changed

.circleci/config.yml

Lines changed: 132 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,154 @@
11

2-
version: 2
3-
4-
_custom:
5-
step__run__install_php_extensions: &step__run__install_php_extensions
6-
name: 'Install PHP extensions'
7-
command: |
8-
sudo apt-get -y install zlib1g-dev
9-
sudo docker-php-ext-install zip
10-
step__run__install_composer: &step__run__install_composer
11-
name: 'Install composer'
12-
command: |
13-
cd /tmp
14-
EXPECTED_SIGNATURE=$(curl -q https://composer.github.io/installer.sig)
15-
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
16-
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
17-
18-
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
19-
then
20-
>&2 echo 'ERROR: Invalid installer signature'
21-
rm composer-setup.php
22-
23-
exit 1
24-
fi
25-
26-
sudo php composer-setup.php --quiet --install-dir /usr/local/bin --filename composer
27-
RESULT=$?
28-
rm composer-setup.php
29-
30-
exit $RESULT
31-
step__restore_cache: &step__restore_cache
32-
name: 'Cache restore - "./vendor"'
33-
keys:
34-
- 'v1-dependencies-{{ checksum "composer.lock" }}'
35-
- 'v1-dependencies-'
36-
step__run__composer_install: &step__run__composer_install
37-
name: 'Build'
38-
command: 'composer install --no-interaction'
39-
step__save_cache: &step__save_cache
40-
name: 'Cache save - "./vendor"'
41-
paths:
42-
- './vendor'
43-
key: 'v1-dependencies-{{ checksum "composer.lock" }}'
44-
step__run__linters: &step__run__linters
45-
name: 'Run linters'
46-
command: 'bin/robo lint'
47-
step__run__codeception_unit: &step__run__codeception_unit
48-
name: 'Codeception - unit'
49-
command: 'bin/robo test unit'
50-
step__run__codeception_acceptance: &step__run__codeception_acceptance
51-
name: 'Codeception - acceptance'
52-
command: 'bin/robo test acceptance'
53-
step__store_test_results: &step__store_test_results
54-
path: 'tests/_output/machine/junit'
55-
step__run__codecov: &step__run__codecov
56-
name: 'Publish the code coverage report on Codecov.io'
57-
when: 'always'
58-
command: >
59-
[ ! -s tests/_output/machine/coverage/*/coverage.xml ]
60-
|| bash <(curl -s https://codecov.io/bash)
61-
|| true
62-
63-
job__lint_and_test: &job__lint_and_test
64-
working_directory: '~/repo'
65-
steps:
66-
- 'checkout'
2+
version: 2.1
3+
4+
.env_composer: &env_composer
5+
COMPOSER_NO_INTERACTION: '1'
6+
COMPOSER_MEMORY_LIMIT: '-1'
7+
COMPOSER_DISABLE_XDEBUG_WARN: '1'
8+
9+
orbs:
10+
codecov: codecov/codecov@1.0.5
11+
12+
executors:
13+
php704:
14+
environment:
15+
<<: *env_composer
16+
17+
docker:
6718
-
68-
run:
69-
<<: *step__run__install_php_extensions
19+
name: 'main'
20+
image: 'circleci/php:7.4'
21+
22+
php703:
23+
environment:
24+
<<: *env_composer
25+
26+
docker:
7027
-
71-
run:
72-
<<: *step__run__install_composer
28+
name: 'main'
29+
image: 'circleci/php:7.3'
30+
31+
php702:
32+
environment:
33+
<<: *env_composer
34+
35+
docker:
36+
-
37+
name: 'main'
38+
image: 'circleci/php:7.2'
39+
40+
commands:
41+
composer_install:
42+
description: 'Install Composer dependencies with cache restore and save'
43+
steps:
7344
-
7445
restore_cache:
75-
<<: *step__restore_cache
46+
name: 'Composer - cache restore'
47+
keys:
48+
- 'composer-{{ checksum "./composer.lock" }}-1'
49+
7650
-
7751
run:
78-
<<: *step__run__composer_install
52+
name: 'Composer - install'
53+
command: >
54+
[[ -d "$(composer config vendor-dir)" ]] || composer install --no-progress
55+
7956
-
8057
save_cache:
81-
<<: *step__save_cache
58+
name: 'Composer - cache save'
59+
key: 'composer-{{ checksum "./composer.lock" }}-1'
60+
paths:
61+
- './bin/'
62+
- './vendor/'
63+
- '~/.composer/cache/'
64+
65+
66+
lint:
67+
description: 'Run linters'
68+
steps:
8269
-
8370
run:
84-
<<: *step__run__linters
71+
name: 'Run linters'
72+
command: 'bin/robo lint'
73+
74+
test:
75+
description: 'Run tests'
76+
steps:
8577
-
8678
run:
87-
<<: *step__run__codeception_unit
79+
name: 'Codeception - unit'
80+
command: 'bin/robo test unit'
81+
-
82+
codecov/upload:
83+
flags: 'unit'
84+
file: './tests/_output/machine/coverage/unit/coverage.xml'
8885
-
8986
run:
90-
<<: *step__run__codeception_acceptance
87+
name: 'Codeception - acceptance'
88+
command: 'bin/robo test acceptance'
9189
-
92-
store_test_results:
93-
<<: *step__store_test_results
90+
codecov/upload:
91+
flags: 'acceptance'
92+
file: './tests/_output/machine/coverage/acceptance/coverage.xml'
9493
-
95-
run:
96-
<<: *step__run__codecov
94+
store_test_results:
95+
name: 'Store unit test results'
96+
path: './tests/_output/machine/junit'
9797

9898
jobs:
99-
php701__lint_and_test:
100-
<<: *job__lint_and_test
101-
docker:
102-
-
103-
image: 'circleci/php:7.1'
104-
php702__lint_and_test:
105-
<<: *job__lint_and_test
106-
docker:
107-
-
108-
image: 'circleci/php:7.2'
99+
build:
100+
executor: 'php702'
101+
working_directory: '~/repo'
102+
steps:
103+
- 'checkout'
104+
- 'composer_install'
105+
lint:
106+
executor: 'php702'
107+
working_directory: '~/repo'
108+
steps:
109+
- 'checkout'
110+
- 'composer_install'
111+
- 'lint'
112+
test_php704:
113+
executor: 'php704'
114+
working_directory: '~/repo'
115+
steps:
116+
- 'checkout'
117+
- 'composer_install'
118+
- 'test'
119+
test_php703:
120+
executor: 'php703'
121+
working_directory: '~/repo'
122+
steps:
123+
- 'checkout'
124+
- 'composer_install'
125+
- 'test'
126+
test_php702:
127+
executor: 'php702'
128+
working_directory: '~/repo'
129+
steps:
130+
- 'checkout'
131+
- 'composer_install'
132+
- 'test'
109133

110134
workflows:
111-
version: 2
112-
php701__lint_and_test:
135+
lint_and_test:
113136
jobs:
114-
- 'php701__lint_and_test'
115-
php702__lint_and_test:
116-
jobs:
117-
- 'php702__lint_and_test'
137+
-
138+
build: {}
139+
-
140+
lint:
141+
requires:
142+
- build
143+
-
144+
test_php704:
145+
requires:
146+
- build
147+
-
148+
test_php703:
149+
requires:
150+
- build
151+
-
152+
test_php702:
153+
requires:
154+
- build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/tests/_support/_generated/
77

88
/.git-hooks.local
9+
/RoboFileLocal.php

codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ paths:
1010
support: tests/_support
1111
envs: tests/_envs
1212

13+
bootstrap: _bootstrap.php
1314
settings:
14-
bootstrap: _bootstrap.php
1515
colors: true
1616
memory_limit: 1024M
1717

composer.json

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,43 @@
22
"name": "sweetchuck/robo-php-lint",
33
"description": "Template to create a new Robo task.",
44
"license": "GPL-2.0-or-later",
5+
"keywords": [
6+
"robo-tasks",
7+
"php-lint"
8+
],
9+
"authors": [
10+
{
11+
"name": "Dávid Andor",
12+
"role": "Maintainer",
13+
"homepage": "https://github.com/Sweetchuck"
14+
}
15+
],
16+
"homepage": "https://github.com/Sweetchuck/robo-php-lint",
17+
"support": {
18+
"source": "https://github.com/Sweetchuck/robo-php-lint",
19+
"issues": "https://github.com/Sweetchuck/robo-php-lint/issues"
20+
},
521
"minimum-stability": "dev",
622
"prefer-stable": true,
723
"config": {
824
"bin-dir": "bin",
925
"sort-packages": true
1026
},
1127
"require": {
12-
"php": ">=7.1",
28+
"php": ">=7.2",
1329
"ext-pcre": "*",
14-
"consolidation/robo": "^1.0",
15-
"sweetchuck/cli-cmd-builder": "^0.0"
30+
"consolidation/robo": "^2.0",
31+
"sweetchuck/utils": "^0.1.0"
1632
},
1733
"require-dev": {
18-
"codeception/codeception": "^2.2",
34+
"codeception/codeception": "^4.0",
35+
"codeception/module-asserts": "^1.1",
1936
"danielstjules/stringy": "^3.0",
20-
"sweetchuck/codeception-module-robo-task-runner": "^0.4",
37+
"squizlabs/php_codesniffer": "^3.5",
38+
"sweetchuck/codeception-module-robo-task-runner": "^0.7",
2139
"sweetchuck/git-hooks": "^0.0",
22-
"sweetchuck/robo-git": "^0.0",
23-
"sweetchuck/robo-phpcs": "^0.0",
40+
"sweetchuck/robo-git": "^0.2",
41+
"sweetchuck/robo-phpcs": "^0.1",
2442
"webmozart/path-util": "^2.3"
2543
},
2644
"autoload": {

0 commit comments

Comments
 (0)