Commit 36ab5818 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

CI setup.

Showing with 52 additions and 1 deletion
+52 -1
stages:
- test
- deploy
.test: &test
stage: test
tags: [docker]
image: php:${CI_JOB_NAME}-cli-alpine
variables:
COMPOSER_ALLOW_SUPERUSER: "1"
before_script:
- curl -sSL https://github.com/composer/composer/releases/download/1.8.4/composer.phar --output /usr/local/bin/composer
- chmod +x /usr/local/bin/composer
- apk update && apk add unzip git
- php -v
- composer -V
- composer global require hirak/prestissimo
script:
- composer install
- php -l src/*.php
- vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
cache:
key: composer-cache
paths:
- /root/.composer/cache
"7.0":
<<: *test
"7.1":
<<: *test
"7.2":
<<: *test
"7.3":
<<: *test
deploy:
stage: deploy
tags: [docker]
image: appropriate/curl
script: ./.packagist.sh
#!/usr/bin/env sh
curl -fsSL \
-H"Content-Type: application/json" \
-d'{"repository":{"url":"'$CI_PROJECT_URL'.git"}}' \
"https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN"
......@@ -10,7 +10,7 @@
}
],
"require": {
"php": "^5.6 | ^7.0",
"php": "^7.0",
"ext-json": "*",
"friendsofphp/php-cs-fixer": "^2.13"
},
......@@ -19,5 +19,8 @@
},
"config": {
"sort-packages": true
},
"archive": {
"exclude": [".?*"]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment