This repository was archived by the owner on May 11, 2020. It is now read-only.
File tree 9 files changed +198
-79
lines changed
9 files changed +198
-79
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+
3
+ php-image : &php-image
4
+ docker :
5
+ - image : circleci/php:7.1-cli-stretch
6
+
7
+
8
+ restore-php-cache : &restore-php-cache
9
+ restore_cache :
10
+ keys :
11
+ - php-vendors-v1-{{ checksum "yarn.lock"}}
12
+ - php-vendors-v1
13
+
14
+ composer-install : &composer-install
15
+ run :
16
+ name : Composer install
17
+ command : composer install --no-interaction --no-scripts --prefer-dist
18
+
19
+ save-php-cache : &save-php-cache
20
+ save_cache :
21
+ key : php-vendors-v1-{{ checksum "composer.lock" }}
22
+ paths :
23
+ - vendor
24
+
25
+
26
+ jobs :
27
+ node :
28
+ docker :
29
+ - image : circleci/node:8
30
+
31
+ steps :
32
+ - checkout
33
+ - restore_cache :
34
+ keys :
35
+ - npm-vendors-v1-{{ checksum "yarn.lock"}}
36
+ - npm-vendors-v1
37
+
38
+ - run :
39
+ name : Yarn install
40
+ command : yarn install
41
+
42
+ - save_cache :
43
+ key : npm-vendors-{{ checksum "yarn.lock"}}
44
+ paths :
45
+ - node_modules
46
+
47
+ - run :
48
+ name : Run front end build
49
+ command : yarn prod
50
+
51
+
52
+ php :
53
+ << : *php-image
54
+
55
+ steps :
56
+ - checkout
57
+ - *restore-php-cache
58
+ - *composer-install
59
+ - *save-php-cache
60
+ - run :
61
+ name : Create test version of secrets.yml
62
+ command : cp app/config/secrets_test.yml app/config/secrets.yml
63
+ - run :
64
+ name : Run CI
65
+ command : composer ci
66
+
67
+ - store-test-results :
68
+ path : reports
69
+
70
+ security :
71
+ << : *php-image
72
+
73
+ steps :
74
+ - checkout
75
+ - *restore-php-cache
76
+ - *composer-install
77
+ - *save-php-cache
78
+
79
+ - run :
80
+ name : PHP security check
81
+ command : composer security
82
+
83
+
84
+ workflows :
85
+ version : 2
86
+ commit :
87
+ jobs :
88
+ - node
89
+ - php
90
+ - security
91
+
92
+
93
+ security-check :
94
+ triggers :
95
+ - schedule :
96
+ cron : " 33 12 * * *"
97
+ filters :
98
+ branches :
99
+ only : develop
100
+
101
+ jobs :
102
+ - security
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 38
38
"psr-4" : {
39
39
"Phpsw\\ Website\\ Tests\\ " : " app/test/"
40
40
}
41
+ },
42
+ "scripts" : {
43
+ "ci" : [
44
+ " @composer-validate" ,
45
+ " @lint" ,
46
+ " @cs" ,
47
+ " @test" ,
48
+ " @validate-data" ,
49
+ " @generate-website"
50
+ ],
51
+ "composer-validate" : " @composer validate --no-check-all --strict" ,
52
+ "lint" : " parallel-lint app runner.php" ,
53
+ "cs" : " php-cs-fixer fix -v --dry-run --verbose --format=junit > reports/phpcs/junit.xml" ,
54
+ "cs-fix" : " php-cs-fixer fix -v" ,
55
+ "test" : " phpunit --log-junit reports/phpunit/junit.xml" ,
56
+ "validate-data" : " php runner.php phpsw:validate-data" ,
57
+ "generate-website" : " php runner.php phpsw:generate-website" ,
58
+ "security" : " security-checker security:check"
41
59
}
42
60
}
Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ This assumes:
53
53
- local hosts is setup (see getting started)
54
54
55
55
56
+ ## Auto fixing coding standards
57
+ Prior to every commit execute ``` composer cs-fix ``` from within the VM. This will fix any code style issues.
58
+
56
59
## CI
57
- Execute ``` ci/run.sh ``` from within the VM to run the CI tests locally.
60
+ Execute ``` composer ci ``` from within the VM to run the CI tests locally.
58
61
59
62
60
63
## Architecture
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
3
+ ! phpcs
4
+ ! phpunit
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
Original file line number Diff line number Diff line change
1
+ *
2
+ ! .gitignore
You can’t perform that action at this time.
0 commit comments