Commit 2f03f98c authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Utilise les préconfigurations de ci-config.

No related merge requests found
Showing with 7 additions and 43 deletions
+7 -43
stages:
- test
- deploy
.test:
stage: test
tags: [docker]
image: gitlab-registry.irstea.fr/pole-is/docker/php:buster-${CI_JOB_NAME}
variables:
COMPOSER_CACHE_DIR: "${CI_PROJECT_DIR}/.composer-cache"
COMPOSER_OPTS: ""
before_script:
- php -v
- composer -V
script:
- composer update $COMPOSER_OPTS
- php -l src/*.php
- vendor/bin/composer-require-checker
- vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
- vendor/bin/phpunit
cache:
key: "composer-cache-${CI_COMMIT_REF_NAME}"
paths:
- "${COMPOSER_CACHE_DIR}"
"7.1":
extends: .test
variables:
COMPOSER_OPTS: "--prefer-lowest --prefer-stable"
"7.3":
extends: .test
deploy:
stage: deploy
tags: [docker]
image: appropriate/curl
script: ./.packagist.sh
include:
- project: pole-is/tools/ci-config
ref: "2.1.0"
file: /php-multiversions-ci.yml
- project: pole-is/tools/ci-config
ref: "2.1.0"
file: /packagist-ci.yml
#!/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"
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