-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
48 lines (40 loc) · 1.45 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
language: php
sudo: false
php:
- 7.4
- 8.0
- 8.1
- 8.2
env:
- SHARIFF_RUN_LINT=1
- SHARIFF_RUN_TEST=1
before_script:
- bash -c 'if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;'
- bash -c 'if [ -n "$SHARIFF_RUN_TEST" ]; then composer install --prefer-dist --no-interaction; fi;'
- bash -c 'if [ -n "$SHARIFF_RUN_LINT" ]; then composer require "squizlabs/php_codesniffer=*"; fi;'
- bash -c 'if [ -n "$SHARIFF_RUN_LINT" ]; then composer require friendsofphp/php-cs-fixer --dev; fi;'
script:
- bash -c 'if [ -n "$SHARIFF_RUN_LINT" ]; then vendor/bin/phpcs --standard=PSR12 index.php src/ tests/; fi;'
- bash -c 'if [ -n "$SHARIFF_RUN_LINT" ]; then make cs_dry_run; fi;'
- bash -c 'if [ -n "$SHARIFF_RUN_TEST" ]; then export XDEBUG_MODE=coverage; vendor/bin/phpunit --coverage-text -v; fi;'
addons:
apt:
packages:
- p7zip-full
before_deploy:
- bash build.sh
- 7z a -tzip shariff-backend-php.zip ./build/*
- 7z a -ttar -so shariff-backend-php.tar ./build/* | 7z a -si shariff-backend-php.tar.gz
deploy:
provider: releases
api_key:
secure: "hWhqbxUyf/x1ou1b/Lj4SFRDH43rRQb4iC2kDwv4/LylibW+k3FIRjH68no7DGEaZML1J7wnKmOVj/AKR+HfPaerqad7aG43ft7IfRGmmB/+syWUo1HM7LzkpaQpN+cV9awuUdIUOSnOMq5Jm3Dx1AHDMJuNsJVUAt9m53h/p/M="
file:
- shariff-backend-php.zip
- shariff-backend-php.tar.gz
skip_cleanup: true
on:
repo: heiseonline/shariff-backend-php
tags: true
php: 7.4
condition: $SHARIFF_RUN_TEST = 1