Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drone CI #1

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
local Pipeline(version) = {
kind: "pipeline",
type: "docker",
name: "Netscape Bookmark Parser CI - PHP " + version,
steps: [
{
name: "test-php-" + version,
image: "nodiscc/drone-ci-base:" + version,
commands: [
# Install dependencies
"composer self-update",
"composer install --prefer-dist",
# Run linter + tests
"make lint",
"make test",
]
}
]
};

[
Pipeline('7.3'),
Pipeline('7.4'),
]
44 changes: 44 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
############################################
# /!\ DO NOT EDIT THIS FILE MANUALLY /!\ #
# ---------------------------------------- #
# 1. Edit .drone.jsonnet file instead #
# 2. Install Drone CLI: #
# https://docs.drone.io/cli/install/ #
# 3. Run: make drone #
# 4. Commit .drone.yml file #
############################################
kind: pipeline
type: docker
name: Netscape Bookmark Parser CI - PHP 7.3

platform:
os: linux
arch: amd64

steps:
- name: test-php-7.3
image: nodiscc/drone-ci-base:7.3
commands:
- composer self-update
- composer install --prefer-dist
- make lint
- make test

---
kind: pipeline
type: docker
name: Netscape Bookmark Parser CI - PHP 7.4

platform:
os: linux
arch: amd64

steps:
- name: test-php-7.4
image: nodiscc/drone-ci-base:7.4
commands:
- composer self-update
- composer install --prefer-dist
- make lint
- make test
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ lint:
@$(BIN)/phpcs
lint-fix:
@$(BIN)/phpcbf
drone:
@echo "---" > .drone.yml
@echo "############################################" >> .drone.yml
@echo "# /!\\ DO NOT EDIT THIS FILE MANUALLY /!\\ #" >> .drone.yml
@echo "# ---------------------------------------- #" >> .drone.yml
@echo "# 1. Edit .drone.jsonnet file instead #" >> .drone.yml
@echo "# 2. Install Drone CLI: #" >> .drone.yml
@echo "# https://docs.drone.io/cli/install/ #" >> .drone.yml
@echo "# 3. Run: make drone #" >> .drone.yml
@echo "# 4. Commit .drone.yml file #" >> .drone.yml
@echo "############################################" >> .drone.yml
@drone jsonnet --stream --stdout | tail -n +2 | head -n -2 >> .drone.yml
@echo "Success! .drone.yml file has been updated based on jsonnet syntax."