Skip to content

Commit c009e6f

Browse files
committed
Switching from Travis to Drone
1 parent a626934 commit c009e6f

File tree

4 files changed

+533
-41
lines changed

4 files changed

+533
-41
lines changed

.drone.jsonnet

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

0 commit comments

Comments
 (0)