-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Sweetchuck/upgrade-dependencies
Upgrade dependencies
- Loading branch information
Showing
26 changed files
with
1,241 additions
and
948 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,170 @@ | ||
|
||
version: 2.1 | ||
|
||
_custom: | ||
step__run__install_php_extensions: &step__run__install_php_extensions | ||
name: 'Install PHP extensions' | ||
command: | | ||
sudo apt-get -y install zlib1g-dev | ||
sudo docker-php-ext-install zip | ||
step__run__install_composer: &step__run__install_composer | ||
name: 'Install composer' | ||
command: | | ||
cd /tmp | ||
EXPECTED_SIGNATURE=$(curl -q https://composer.github.io/installer.sig) | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") | ||
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer signature' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
sudo php composer-setup.php --quiet --install-dir /usr/local/bin --filename composer | ||
RESULT=$? | ||
rm composer-setup.php | ||
exit $RESULT | ||
step__restore_cache: &step__restore_cache | ||
name: 'Cache restore - "./vendor"' | ||
keys: | ||
- 'v1-dependencies-{{ checksum "composer.lock" }}' | ||
- 'v1-dependencies-' | ||
step__run__composer_install: &step__run__composer_install | ||
name: 'Build' | ||
command: 'composer install --no-interaction' | ||
step__save_cache: &step__save_cache | ||
name: 'Cache save - "./vendor"' | ||
paths: | ||
- './vendor' | ||
key: 'v1-dependencies-{{ checksum "composer.lock" }}' | ||
step__run__linters: &step__run__linters | ||
name: 'Run linters' | ||
command: 'bin/robo lint' | ||
step__run__codeception_unit: &step__run__codeception_unit | ||
name: 'Codeception - unit' | ||
command: 'bin/robo test unit' | ||
step__run__codeception_acceptance: &step__run__codeception_acceptance | ||
name: 'Codeception - acceptance' | ||
command: 'bin/robo test acceptance' | ||
step__store_test_results: &step__store_test_results | ||
path: 'tests/_output/machine/junit' | ||
step__run__codecov: &step__run__codecov | ||
name: 'Publish the code coverage report on Codecov.io' | ||
when: 'always' | ||
command: > | ||
[ ! -s tests/_output/machine/coverage/*/coverage.xml ] | ||
|| bash <(curl -s https://codecov.io/bash) | ||
|| true | ||
job__lint_and_test: &job__lint_and_test | ||
working_directory: '~/repo' | ||
.env_composer: &env_composer | ||
COMPOSER_NO_INTERACTION: '1' | ||
COMPOSER_MEMORY_LIMIT: '-1' | ||
COMPOSER_DISABLE_XDEBUG_WARN: '1' | ||
|
||
orbs: | ||
codecov: 'codecov/codecov@1.0.4' | ||
|
||
executors: | ||
php704: | ||
environment: | ||
<<: *env_composer | ||
|
||
docker: | ||
- name: 'main' | ||
image: 'misterio92/ci-php-node:4.0' | ||
|
||
php703: | ||
environment: | ||
<<: *env_composer | ||
|
||
docker: | ||
- name: 'main' | ||
image: 'misterio92/ci-php-node:3.0' | ||
|
||
php702: | ||
environment: | ||
USER: 'circleci' | ||
<<: *env_composer | ||
|
||
docker: | ||
- name: 'main' | ||
image: 'misterio92/ci-php-node:2.0' | ||
|
||
commands: | ||
install_yarn: | ||
description: 'Install "yarn" NPM package' | ||
steps: | ||
- 'checkout' | ||
- | ||
run: | ||
<<: *step__run__install_php_extensions | ||
name: 'Install Yarn' | ||
command: 'npm install -g yarn@1.15.2' | ||
|
||
install_php_requirements: | ||
description: '' | ||
steps: | ||
- | ||
run: | ||
<<: *step__run__install_composer | ||
- | ||
restore_cache: | ||
<<: *step__restore_cache | ||
name: 'Install required PHP extensions' | ||
command: | | ||
apt-get update | ||
apt-get install -y php-xdebug | ||
composer_install: | ||
description: 'Install Composer dependencies with cache restore and save' | ||
steps: | ||
- restore_cache: | ||
name: 'Composer - cache restore' | ||
keys: | ||
- 'composer-{{ checksum "./composer.lock" }}-1' | ||
|
||
- run: | ||
name: 'Composer - install' | ||
command: > | ||
[[ -d "$(composer config vendor-dir)" ]] || composer install --no-progress | ||
- save_cache: | ||
name: 'Composer - cache save' | ||
key: 'composer-{{ checksum "./composer.lock" }}-1' | ||
paths: | ||
- './bin/' | ||
- './vendor/' | ||
- '~/.composer/cache/' | ||
|
||
lint: | ||
description: 'Run linters' | ||
steps: | ||
- run: | ||
name: 'Run linters' | ||
command: 'bin/robo lint' | ||
|
||
test: | ||
description: 'Run tests' | ||
steps: | ||
- | ||
run: | ||
<<: *step__run__composer_install | ||
name: 'Run unit tests' | ||
command: 'bin/robo test unit' | ||
- | ||
save_cache: | ||
<<: *step__save_cache | ||
codecov/upload: | ||
flags: 'unit' | ||
file: './tests/_output/machine/coverage/unit/coverage.xml' | ||
- | ||
run: | ||
<<: *step__run__linters | ||
name: 'Run acceptance tests' | ||
command: 'bin/robo test acceptance' | ||
- | ||
run: | ||
<<: *step__run__codeception_unit | ||
- | ||
run: | ||
<<: *step__run__codeception_acceptance | ||
codecov/upload: | ||
flags: 'acceptance' | ||
file: './tests/_output/machine/coverage/acceptance/coverage.xml' | ||
- | ||
store_test_results: | ||
<<: *step__store_test_results | ||
- | ||
run: | ||
<<: *step__run__codecov | ||
name: 'Store unit test results' | ||
path: './tests/_output/machine/junit' | ||
|
||
jobs: | ||
php701__lint_and_test: | ||
<<: *job__lint_and_test | ||
docker: | ||
- | ||
image: 'circleci/php:7.1' | ||
|
||
php702__lint_and_test: | ||
<<: *job__lint_and_test | ||
docker: | ||
- | ||
image: 'circleci/php:7.2' | ||
|
||
php703__lint_and_test: | ||
<<: *job__lint_and_test | ||
docker: | ||
- | ||
image: 'circleci/php:7.3' | ||
build: | ||
executor: 'php702' | ||
working_directory: '~/repo' | ||
steps: | ||
- 'checkout' | ||
- 'composer_install' | ||
lint: | ||
executor: 'php702' | ||
working_directory: '~/repo' | ||
steps: | ||
- 'checkout' | ||
- 'composer_install' | ||
- 'lint' | ||
test_php704: | ||
executor: 'php704' | ||
working_directory: '~/repo' | ||
steps: | ||
- 'checkout' | ||
- 'install_yarn' | ||
- 'install_php_requirements' | ||
- 'composer_install' | ||
- 'test' | ||
test_php703: | ||
executor: 'php703' | ||
working_directory: '~/repo' | ||
steps: | ||
- 'checkout' | ||
- 'install_yarn' | ||
- 'install_php_requirements' | ||
- 'composer_install' | ||
- 'test' | ||
test_php702: | ||
executor: 'php702' | ||
working_directory: '~/repo' | ||
steps: | ||
- 'checkout' | ||
- 'install_yarn' | ||
- 'install_php_requirements' | ||
- 'composer_install' | ||
- 'test' | ||
|
||
workflows: | ||
version: 2.1 | ||
php701__lint_and_test: | ||
lint_and_test: | ||
jobs: | ||
- 'php701__lint_and_test' | ||
php702__lint_and_test: | ||
jobs: | ||
- 'php702__lint_and_test' | ||
php703__lint_and_test: | ||
jobs: | ||
- 'php702__lint_and_test' | ||
- | ||
build: {} | ||
- | ||
lint: | ||
requires: | ||
- build | ||
- | ||
test_php704: | ||
requires: | ||
- build | ||
- | ||
test_php703: | ||
requires: | ||
- build | ||
- | ||
test_php702: | ||
requires: | ||
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ paths: | |
envs: tests/_envs | ||
|
||
settings: | ||
bootstrap: _bootstrap.php | ||
colors: true | ||
memory_limit: 1024M | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.