Merge pull request #1741 from nodiscc/drone-ci

switch continuous integration system to Drone CI
This commit is contained in:
nodiscc 2021-05-16 17:32:42 +00:00 committed by GitHub
commit d8fe0e7276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 122 additions and 75 deletions

115
.drone.yml Normal file
View 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

View file

@ -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

View file

@ -13,7 +13,7 @@ _It is designed to be personal (single-user), fast and handy._
[![](https://img.shields.io/travis/shaarli/Shaarli/latest.svg?label=latest)](https://travis-ci.org/shaarli/Shaarli) [![](https://img.shields.io/travis/shaarli/Shaarli/latest.svg?label=latest)](https://travis-ci.org/shaarli/Shaarli)
• •
[![](https://img.shields.io/badge/master-v0.12.x-blue.svg)](https://github.com/shaarli/Shaarli) [![](https://img.shields.io/badge/master-v0.12.x-blue.svg)](https://github.com/shaarli/Shaarli)
[![](https://img.shields.io/travis/shaarli/Shaarli.svg?label=master)](https://travis-ci.org/shaarli/Shaarli) [![](https://cloud.drone.io/api/badges/shaarli/Shaarli/status.svg?ref=refs/heads/master)](https://cloud.drone.io/shaarli/Shaarli)
[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli) [![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli)
[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues) [![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues)

View file

@ -143,17 +143,17 @@ A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is avail
### Continuous Integration ### Continuous Integration
[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build: [Drone CI](https://cloud.drone.io/shaarli/Shaarli) is a Continuous Integration build server, that runs a build:
- each time a commit is merged to the mainline (`master` branch) - each time a commit is pushed to any branch
- each time a Pull Request is submitted or updated - each time a Pull Request is submitted or updated
After all jobs have finished, Travis returns the results to GitHub: After all jobs have finished, Drone returns the results to GitHub:
- a status icon represents the result for the `master` branch: [![](https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli) - a status icon represents the result for the `master` branch: [![Build Status](https://cloud.drone.io/api/badges/shaarli/Shaarli/status.svg?ref=refs/heads/master)](https://cloud.drone.io/shaarli/Shaarli)
- Pull Requests are updated with the Travis build result. - Pull Requests are updated with the Drone build result.
See [`.travis.yml`](https://github.com/shaarli/Shaarli/blob/master/.travis.yml). See [`.drone.yml`](https://github.com/shaarli/Shaarli/blob/master/.drone.yml).
### Documentation ### Documentation