Attempt to run CI in stages
Some checks failed
Gitea - aviat/banker/pipeline/head There was a failure building this commit
Some checks failed
Gitea - aviat/banker/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f7a754ef56
commit
ebef8075b8
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
@ -1,19 +1,44 @@
|
|||||||
node {
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage("Setup") {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
sh 'curl -sS https://getcomposer.org/installer | php'
|
||||||
|
sh 'rm -rf ./vendor'
|
||||||
|
sh 'rm -f composer.lock'
|
||||||
|
sh 'php composer.phar install --ignore-platform-reqs'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Test PHP 7.4") {
|
||||||
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
|
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
|
||||||
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
|
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
|
||||||
docker.image("php:7.4").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
|
docker.image("php:7.4").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
|
||||||
checkout scm
|
|
||||||
sh "sh build/docker_install.sh > /dev/null"
|
sh "sh build/docker_install.sh > /dev/null"
|
||||||
sh "curl -sS https://getcomposer.org/installer | php"
|
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
|
||||||
sh "php composer.phar install --ignore-platform-reqs"
|
|
||||||
sh "phpdbg -qrr -- ./vendor/bin/phpunit -c build --coverage-text --colors=never"
|
|
||||||
}
|
}
|
||||||
docker.image("php:8").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
|
}
|
||||||
checkout scm
|
}
|
||||||
|
}
|
||||||
|
stage("Test PHP 8") {
|
||||||
|
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
|
||||||
|
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
|
||||||
|
docker.image("php:7.4").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
|
||||||
sh "sh build/docker_install.sh > /dev/null"
|
sh "sh build/docker_install.sh > /dev/null"
|
||||||
sh "curl -sS https://getcomposer.org/installer | php"
|
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
|
||||||
sh "php composer.phar install --ignore-platform-reqs"
|
}
|
||||||
sh "phpdbg -qrr -- ./vendor/bin/phpunit -c build --coverage-text --colors=never"
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Coverage") {
|
||||||
|
agent any
|
||||||
|
steps {
|
||||||
|
sh 'php composer.phar run-script coverage'
|
||||||
|
step([
|
||||||
|
$class: 'CloverPublisher',
|
||||||
|
cloverReportDir: '',
|
||||||
|
cloverReportFileName: 'build/logs/clover.xml',
|
||||||
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class MemcachedDriverTest extends DriverTestBase {
|
|||||||
if (array_key_exists('MEMCACHED_HOST', $_ENV))
|
if (array_key_exists('MEMCACHED_HOST', $_ENV))
|
||||||
{
|
{
|
||||||
$config['host'] = $_ENV['MEMCACHED_HOST'];
|
$config['host'] = $_ENV['MEMCACHED_HOST'];
|
||||||
$config['port'] = 11212;
|
$config['port'] = $_ENV['MEMCACHED_PORT'] ?? 11211;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->driver = new MemcachedDriver($config);
|
$this->driver = new MemcachedDriver($config);
|
||||||
|
@ -26,7 +26,7 @@ class RedisDriverTest extends DriverTestBase {
|
|||||||
{
|
{
|
||||||
$config['scheme'] = 'tcp';
|
$config['scheme'] = 'tcp';
|
||||||
$config['host'] = $_ENV['REDIS_HOST'];
|
$config['host'] = $_ENV['REDIS_HOST'];
|
||||||
$config['port'] = 6380;
|
$config['port'] = $_ENV['REDIS_PORT'] ?? 6379;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->driver = new RedisDriver($config);
|
$this->driver = new RedisDriver($config);
|
||||||
|
Loading…
Reference in New Issue
Block a user