Skip to content

Commit 1b17c5e

Browse files
authored
Switching from Travis to Drone (#26)
* Switch from Travis to Drone * Using modified codestyle
1 parent 5fc1f6f commit 1b17c5e

File tree

4 files changed

+511
-41
lines changed

4 files changed

+511
-41
lines changed

.drone.jsonnet

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
local volumes = [
2+
{
3+
name: "composer-cache",
4+
path: "/tmp/composer-cache",
5+
},
6+
];
7+
8+
local hostvolumes = [
9+
{
10+
name: "composer-cache",
11+
host: {path: "/tmp/composer-cache"}
12+
},
13+
];
14+
15+
local composer(phpversion, params) = {
16+
name: "composer",
17+
image: "joomlaprojects/docker-images:php" + phpversion,
18+
volumes: volumes,
19+
commands: [
20+
"php -v",
21+
"composer update " + params,
22+
]
23+
};
24+
25+
local phpunit(phpversion) = {
26+
name: "PHPUnit",
27+
image: "joomlaprojects/docker-images:php" + phpversion,
28+
[if phpversion == "8.0" then "failure"]: "ignore",
29+
commands: ["vendor/bin/phpunit"]
30+
};
31+
32+
local pipeline(name, phpversion, params) = {
33+
kind: "pipeline",
34+
name: "PHP " + name,
35+
volumes: hostvolumes,
36+
steps: [
37+
composer(phpversion, params),
38+
phpunit(phpversion)
39+
],
40+
};
41+
42+
[
43+
{
44+
kind: "pipeline",
45+
name: "Codequality",
46+
volumes: hostvolumes,
47+
steps: [
48+
{
49+
name: "composer",
50+
image: "joomlaprojects/docker-images:php7.4",
51+
volumes: volumes,
52+
commands: [
53+
"php -v",
54+
"composer update",
55+
"composer require phpmd/phpmd phpstan/phpstan"
56+
]
57+
},
58+
{
59+
name: "phpcs",
60+
image: "joomlaprojects/docker-images:php7.4",
61+
depends: [ "composer" ],
62+
commands: [
63+
"vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards",
64+
"vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/"
65+
]
66+
},
67+
{
68+
name: "phpmd",
69+
image: "joomlaprojects/docker-images:php7.4",
70+
depends: [ "composer" ],
71+
failure: "ignore",
72+
commands: [
73+
"vendor/bin/phpmd src text cleancode",
74+
"vendor/bin/phpmd src text codesize",
75+
"vendor/bin/phpmd src text controversial",
76+
"vendor/bin/phpmd src text design",
77+
"vendor/bin/phpmd src text unusedcode",
78+
]
79+
},
80+
{
81+
name: "phpstan",
82+
image: "joomlaprojects/docker-images:php7.4",
83+
depends: [ "composer" ],
84+
failure: "ignore",
85+
commands: [
86+
"vendor/bin/phpstan analyse src",
87+
]
88+
},
89+
{
90+
name: "phploc",
91+
image: "joomlaprojects/docker-images:php7.4",
92+
depends: [ "composer" ],
93+
failure: "ignore",
94+
commands: [
95+
"phploc src",
96+
]
97+
},
98+
{
99+
name: "phpcpd",
100+
image: "joomlaprojects/docker-images:php7.4",
101+
depends: [ "composer" ],
102+
failure: "ignore",
103+
commands: [
104+
"phpcpd src",
105+
]
106+
}
107+
]
108+
},
109+
{
110+
kind: "pipeline",
111+
name: "PHP 5.3 lowest",
112+
volumes: hostvolumes,
113+
steps: [
114+
{
115+
name: "composer",
116+
image: "joomlaprojects/docker-images:php5.3",
117+
volumes: volumes,
118+
commands: [
119+
"php -v",
120+
"composer update --prefer-stable --prefer-lowest",
121+
"composer update phpunit/phpunit-mock-objects"
122+
]
123+
},
124+
phpunit("5.3")
125+
]
126+
},
127+
pipeline("5.3", "5.3", "--prefer-stable"),
128+
pipeline("5.4", "5.4", "--prefer-stable"),
129+
pipeline("5.5", "5.5", "--prefer-stable"),
130+
pipeline("5.6", "5.6", "--prefer-stable"),
131+
pipeline("7.0", "7.0", "--prefer-stable"),
132+
pipeline("7.1", "7.1", "--prefer-stable"),
133+
pipeline("7.2", "7.2", "--prefer-stable"),
134+
pipeline("7.3", "7.3", "--prefer-stable"),
135+
pipeline("7.4", "7.4", "--prefer-stable"),
136+
pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable")
137+
]

0 commit comments

Comments
 (0)