Skip to content

Commit

Permalink
Switching from Travis to Drone
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Sep 18, 2020
1 parent c8eb8cf commit 5dc3d1d
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 38 deletions.
114 changes: 114 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
local volumes = [
{
name: "composer-cache",
path: "/tmp/composer-cache",
},
];

local hostvolumes = [
{
name: "composer-cache",
host: {path: "/tmp/composer-cache"}
},
];

local composer(phpversion, params) = {
name: "composer",
image: "joomlaprojects/docker-images:php" + phpversion,
volumes: volumes,
commands: [
"php -v",
"composer update " + params,
]
};

local phpunit(phpversion) = {
name: "PHPUnit",
image: "joomlaprojects/docker-images:php" + phpversion,
[if phpversion == "8.0" then "failure"]: "ignore",
commands: ["vendor/bin/phpunit"]
};

local pipeline(name, phpversion, params) = {
kind: "pipeline",
name: "PHP " + name,
volumes: hostvolumes,
steps: [
composer(phpversion, params),
phpunit(phpversion)
],
};

[
{
kind: "pipeline",
name: "Codequality",
volumes: hostvolumes,
steps: [
{
name: "composer",
image: "joomlaprojects/docker-images:php7.4",
volumes: volumes,
commands: [
"php -v",
"composer update",
"composer require phpmd/phpmd phpstan/phpstan"
]
},
{
name: "phpcs",
image: "joomlaprojects/docker-images:php7.4",
depends: [ "composer" ],
commands: [
"vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards",
"vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/"
]
},
{
name: "phpmd",
image: "joomlaprojects/docker-images:php7.4",
depends: [ "composer" ],
failure: "ignore",
commands: [
"vendor/bin/phpmd src text cleancode",
"vendor/bin/phpmd src text codesize",
"vendor/bin/phpmd src text controversial",
"vendor/bin/phpmd src text design",
"vendor/bin/phpmd src text unusedcode",
]
},
{
name: "phpstan",
image: "joomlaprojects/docker-images:php7.4",
depends: [ "composer" ],
failure: "ignore",
commands: [
"vendor/bin/phpstan analyse src",
]
},
{
name: "phploc",
image: "joomlaprojects/docker-images:php7.4",
depends: [ "composer" ],
failure: "ignore",
commands: [
"phploc src",
]
},
{
name: "phpcpd",
image: "joomlaprojects/docker-images:php7.4",
depends: [ "composer" ],
failure: "ignore",
commands: [
"phpcpd src",
]
}
]
},
pipeline("7.2 lowest", "7.2", "--prefer-stable --prefer-lowest"),
pipeline("7.2", "7.2", "--prefer-stable"),
pipeline("7.3", "7.3", "--prefer-stable"),
pipeline("7.4", "7.4", "--prefer-stable"),
pipeline("8.0", "8.0", "--ignore-platform-reqs --prefer-stable")
]
204 changes: 204 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
---
kind: pipeline
name: Codequality

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php7.4
commands:
- php -v
- composer update
- composer require phpmd/phpmd phpstan/phpstan
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: phpcs
image: joomlaprojects/docker-images:php7.4
commands:
- vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards
- vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/

- name: phpmd
image: joomlaprojects/docker-images:php7.4
commands:
- vendor/bin/phpmd src text cleancode
- vendor/bin/phpmd src text codesize
- vendor/bin/phpmd src text controversial
- vendor/bin/phpmd src text design
- vendor/bin/phpmd src text unusedcode
failure: ignore

- name: phpstan
image: joomlaprojects/docker-images:php7.4
commands:
- vendor/bin/phpstan analyse src
failure: ignore

- name: phploc
image: joomlaprojects/docker-images:php7.4
commands:
- phploc src
failure: ignore

- name: phpcpd
image: joomlaprojects/docker-images:php7.4
commands:
- phpcpd src
failure: ignore

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: pipeline
name: PHP 7.2 lowest

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- composer update --prefer-stable --prefer-lowest
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: PHPUnit
image: joomlaprojects/docker-images:php7.2
commands:
- vendor/bin/phpunit

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: pipeline
name: PHP 7.2

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- composer update --prefer-stable
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: PHPUnit
image: joomlaprojects/docker-images:php7.2
commands:
- vendor/bin/phpunit

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: pipeline
name: PHP 7.3

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- composer update --prefer-stable
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: PHPUnit
image: joomlaprojects/docker-images:php7.3
commands:
- vendor/bin/phpunit

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: pipeline
name: PHP 7.4

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php7.4
commands:
- php -v
- composer update --prefer-stable
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: PHPUnit
image: joomlaprojects/docker-images:php7.4
commands:
- vendor/bin/phpunit

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: pipeline
name: PHP 8.0

platform:
os: linux
arch: amd64

steps:
- name: composer
image: joomlaprojects/docker-images:php8.0
commands:
- php -v
- composer update --ignore-platform-reqs --prefer-stable
volumes:
- name: composer-cache
path: /tmp/composer-cache

- name: PHPUnit
image: joomlaprojects/docker-images:php8.0
commands:
- vendor/bin/phpunit
failure: ignore

volumes:
- name: composer-cache
host:
path: /tmp/composer-cache

---
kind: signature
hmac: 6a98d54253c885a54a46f2fb7d4c78f26da098c06f6d0ec6356e27ea7fca34c8

...
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## The Data Package [![Build Status](https://travis-ci.org/joomla-framework/data.png?branch=master)](https://travis-ci.org/joomla-framework/data)
## The Data Package Copied [![Build Status](https://ci.joomla.org/api/badges/joomla-framework/data/status.svg?ref=refs/heads/2.0-dev)](https://ci.joomla.org/joomla-framework/data)

### `Data\DataObject`

Expand Down Expand Up @@ -188,18 +188,18 @@ if (!empty($hurt))

## Installation via Composer

Add `"joomla/data": "2.0.*@dev"` to the require block in your composer.json and then run `composer install`.
Add `"joomla/data": "~1.0"` to the require block in your composer.json and then run `composer install`.

```json
{
"require": {
"joomla/data": "2.0.*@dev"
"joomla/data": "~1.0"
}
}
```

Alternatively, you can simply run the following from the command line:

```sh
composer require joomla/data "2.0.*@dev"
composer require joomla/data "~1.0"
```
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"joomla/registry": "^1.4.5|^2.0"
},
"require-dev": {
"joomla/coding-standards": "^2.0@alpha",
"joomla/coding-standards": "^3.0@dev",
"joomla/test": "^2.0",
"phpunit/phpunit": "^8.5|^9.0"
},
Expand Down

0 comments on commit 5dc3d1d

Please sign in to comment.