Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavide committed Mar 13, 2018
0 parents commit 69ee6b4
Show file tree
Hide file tree
Showing 597 changed files with 55,657 additions and 0 deletions.
137 changes: 137 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build_and_test:
docker:
# specify the version you desire here
- image: circleci/php:7.1-cli

environment:
- APP_ENV: "testing"

steps:
- checkout

- restore_cache:
keys:
- v1-php-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-php-

- restore_cache:
keys:
- v1-node-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-node-

- run:
name: Install php dependencies
command: composer install -n --ignore-platform-reqs

- run:
name: Install node version defined in .node-version
command: |
git clone https://github.com/nodenv/node-build.git ../node-build
sudo ../node-build/install.sh
sudo node-build $(cat .node-version) /usr/local
- run:
name: Install node dependencies
command: npm install

- save_cache:
paths:
- ./vendor
key: v1-php-{{ checksum "composer.json" }}

- save_cache:
paths:
- ./node_modules
key: v1-node-{{ checksum "package.json" }}

- setup_remote_docker

# build
- run: bin/phing build

# test
- run: bin/phing test

deploy-staging:
docker:
# specify the version you desire here
- image: circleci/php:7.1-cli

environment:
- APP_ENV: "staging"

steps:
- checkout

- restore_cache:
keys:
- v1-php-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-php-

- run:
name: Install php dependencies
command: composer install -n --ignore-platform-reqs

# build
- run: bin/dep -vvv deploy staging

deploy-production:
docker:
# specify the version you desire here
- image: circleci/php:7.1-cli

environment:
- APP_ENV: "production"

steps:
- checkout

- restore_cache:
keys:
- v1-php-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-php-

- run:
name: Install php dependencies
command: composer install -n --ignore-platform-reqs

# build
- run: bin/dep -vvv deploy production

workflows:
version: 2
build-test-deploy-staging:
jobs:
- build_and_test:
filters:
branches:
only:
- develop
- deploy-staging:
requires:
- build_and_test

build-test-deploy-production:
jobs:
- build_and_test:
filters:
branches:
only:
- master
- hold:
type: approval
requires:
- build_and_test
- deploy-production:
requires:
- hold
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# http://editorconfig.org

# A special property that should be specified at the top of the file outside of
# any sections. Set to true to stop .editor config file search on current file
root = true

[*]
# Indentation style
# Possible values - tab, space
indent_style = space

# Line ending file format
# Possible values - lf, crlf, cr
end_of_line = lf

# File character encoding
# Possible values - latin1, utf-8, utf-16be, utf-16le
charset = utf-8

# Denotes whether to trim whitespace at the end of lines
# Possible values - true, false
trim_trailing_whitespace = true

# Denotes whether file should end with a newline
# Possible values - true, false
insert_final_newline = true

[*.php]
# Indentation size in single-spaced characters
# Possible values - an integer, tab
indent_size = 4

[*.blade.php]
# Indentation size in single-spaced characters
# Possible values - an integer, tab
indent_size = 2
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "eslint:recommended"
}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/node_modules
/public/storage
/vendor
/bin
/containers/data
/containers/application/data
/containers/logs/**/*log
/containers/logs/**/messages
/containers/.env
/containers/**/xdebug.ini
/packages
/coverage
/database/testing.sqlite
.php_cs.cache
.env
.env.dusk.*
.idea
build.properties
/hosts.yml
/ssh_keys
TODO
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.9.4
26 changes: 26 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
$excluded_folders = [
'node_modules',
'storage',
'vendor',
'bootstap/cache'
];
$finder = PhpCsFixer\Finder::create()
->exclude($excluded_folders)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->in(__DIR__);

return PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'binary_operator_spaces' => ['align_double_arrow' => true],
'array_syntax' => ['syntax' => 'short'],
'linebreak_after_opening_tag' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
))
->setFinder($finder);
6 changes: 6 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"no-descending-specificity": null
}
}
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Copyright (c) 2018 Presidenza del Consiglio dei Ministri

Moral rights:
Davide Porrovecchio

The version control system provides attribution for specific lines of code.
Loading

0 comments on commit 69ee6b4

Please sign in to comment.