switch continuous integration system to Drone CI:
- add .drone.yml, reimplement tasks from .travis.yml (php/node/python test suites) - ref. https://github.com/shaarli/Shaarli/issues/1649 - https://www.drone.io/enterprise/opensource/ - https://cloud.drone.io/shaarli/Shaarli/settings - https://docs.drone.io/pipeline/docker/syntax/steps/ - https://docs.drone.io/pipeline/docker/syntax/cloning/ - https://docs.drone.io/pipeline/environment/reference/ - https://docs.drone.io/pipeline/configuration/ - https://docs.drone.io/pipeline/overview/ - https://docs.drone.io/pipeline/docker/syntax/volumes/ - https://docs.drone.io/pipeline/docker/syntax/volumes/temporary/ - php: use custom php base images with prebuilt PHP extensions and composer (speed up build process) (https://hub.docker.com/r/shaarli/drone-ci-base, https://www.github.com/shaarli/drone-ci-base, https://hub.docker.com/repository/docker/shaarli/drone-ci-base/builds) - no need to port $PATH update command, the default node:10 image already has the correct $PATH - don't force pull of latest images to speed up builds - the default is to use a local/cached image when the image is not tagged :latest - https://docs.drone.io/pipeline/docker/syntax/parallelism/ - https://docs.drone.io/pipeline/environment/reference/drone-git-http-url/ - ignore PHP version requirements for https://packagist.org/packages/pubsubhubbub/publisher, pending merge of https://github.com/pubsubhubbub/php-publisher/pull/11 - closes https://github.com/shaarli/Shaarli/issues/1649
This commit is contained in:
parent
0f4cd55599
commit
832739e58f
2 changed files with 115 additions and 68 deletions
115
.drone.yml
Normal file
115
.drone.yml
Normal file
|
@ -0,0 +1,115 @@
|
|||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: php-8.0
|
||||
|
||||
steps:
|
||||
- name: test-php-8.0
|
||||
image: shaarli/drone-ci-base:8.0
|
||||
commands:
|
||||
- composer config --unset platform && composer config platform.php 8.0
|
||||
- composer update --ignore-platform-req=php
|
||||
- composer remove --dev --ignore-platform-req=php phpunit/phpunit
|
||||
- composer require --dev --ignore-platform-req=php phpunit/php-text-template ^2.0
|
||||
- composer require --dev --ignore-platform-req=php phpunit/phpunit ^9.0
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: php-7.4
|
||||
|
||||
steps:
|
||||
- name: test-php-7.4
|
||||
image: shaarli/drone-ci-base:7.4
|
||||
commands:
|
||||
- composer config --unset platform && composer config platform.php 7.4
|
||||
- composer update
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: php-7.3
|
||||
|
||||
steps:
|
||||
- name: test-php-7.3
|
||||
image: shaarli/drone-ci-base:7.3
|
||||
commands:
|
||||
- composer config --unset platform && composer config platform.php 7.3
|
||||
- composer update
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: php-7.2
|
||||
|
||||
steps:
|
||||
- name: test-php-7.2
|
||||
image: shaarli/drone-ci-base:7.2
|
||||
commands:
|
||||
- composer config --unset platform && composer config platform.php 7.2
|
||||
- composer update
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: php-7.1
|
||||
|
||||
steps:
|
||||
- name: test-php-7.1
|
||||
image: shaarli/drone-ci-base:7.1
|
||||
commands:
|
||||
- composer config --unset platform && composer config platform.php 7.1
|
||||
- composer update
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: node-10
|
||||
|
||||
steps:
|
||||
- name: test-node-10
|
||||
image: node:10
|
||||
commands:
|
||||
- yarn install
|
||||
- yarn run build # verify successful frontend builds
|
||||
- make eslint # javascript static analysis
|
||||
- make sasslint # linter for SASS syntax
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: python-3.6
|
||||
|
||||
steps:
|
||||
- name: test-python-3.6
|
||||
image: python:3.6-slim
|
||||
commands:
|
||||
- pip install mkdocs
|
||||
- mkdocs build --clean
|
68
.travis.yml
68
.travis.yml
|
@ -1,68 +0,0 @@
|
|||
dist: bionic
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# jobs for each supported php version
|
||||
- language: php
|
||||
php: nightly # PHP 8.0
|
||||
install:
|
||||
- composer self-update --2
|
||||
- composer update --ignore-platform-req=php
|
||||
- composer remove --dev --ignore-platform-req=php phpunit/phpunit
|
||||
- composer require --dev --ignore-platform-req=php phpunit/php-text-template ^2.0
|
||||
- composer require --dev --ignore-platform-req=php phpunit/phpunit ^9.0
|
||||
- language: php
|
||||
php: 7.4
|
||||
- language: php
|
||||
php: 7.3
|
||||
- language: php
|
||||
php: 7.2
|
||||
- language: php
|
||||
php: 7.1
|
||||
# jobs for frontend builds
|
||||
- language: node_js
|
||||
node_js: 10
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- $HOME/.cache/yarn
|
||||
install:
|
||||
- yarn install
|
||||
before_script:
|
||||
- PATH=${PATH//:\.\/node_modules\/\.bin/}
|
||||
script:
|
||||
- yarn run build # verify successful frontend builds
|
||||
- make eslint # javascript static analysis
|
||||
- make sasslint # linter for SASS syntax
|
||||
# jobs for documentation builds
|
||||
- language: python
|
||||
python: 3.6
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
install:
|
||||
- pip install mkdocs
|
||||
script:
|
||||
- mkdocs build --clean
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
||||
before_install:
|
||||
# Disable xdebug: it significantly speed up tests and linter, and we don't use coverage yet
|
||||
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
|
||||
|
||||
install:
|
||||
# install/update composer and php dependencies
|
||||
- composer config --unset platform && composer config platform.php $TRAVIS_PHP_VERSION
|
||||
- composer update
|
||||
|
||||
before_script:
|
||||
- PATH=${PATH//:\.\/node_modules\/\.bin/}
|
||||
|
||||
script:
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make code_sniffer
|
||||
- make all_tests
|
Loading…
Reference in a new issue