Skip to content

Commit

Permalink
Update PHP deps (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Apr 28, 2021
1 parent cfc004b commit 71d9844
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 28 deletions.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
# @link https://github.com/JBZoo/Less
#

/.phan export-ignore

/.github export-ignore
/build export-ignore
/cache export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.phan.php export-ignore
/phpunit.xml.dist export-ignore
/Makefile export-ignore

Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#
# JBZoo Toolbox - Less
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Less
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Less
#

name: CI

on:
pull_request:
branches:
- "*"
push:
branches:
- 'master'
schedule:
- cron: '30 */8 * * *'

env:
COLUMNS: 120
TERM_PROGRAM: Hyper

jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
env:
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
composer_flags: [ "--prefer-lowest", "" ]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer

- name: Build the Project
run: make update --no-print-directory

- name: 🧪 PHPUnit Tests
run: make test --no-print-directory

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }}
path: build/


linters:
name: Linters
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ast
tools: composer

- name: Build the Project
run: make update --no-print-directory

- name: 👍 Code Quality
run: make codestyle --no-print-directory

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Linters - ${{ matrix.php-version }}
path: build/


report:
name: Reports
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer

- name: Build the Project
run: make update --no-print-directory

- name: 📝 Build Reports
run: make report-all --no-print-directory

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Reports - ${{ matrix.php-version }}
path: build/
7 changes: 6 additions & 1 deletion .phan/config.php → .phan.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@

declare(strict_types=1);

$default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php';
if (version_compare(PHP_VERSION, '8.0') >= 0 && getenv('CI_TRAVIS')) {
echo "Doesn't compatible with PHP 8.0 in travis. Needs PHP ext-ast. See GitHub Actions =( instead";
die(0);
}

$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan/default.php';

return array_merge($default, [
'directory_list' => [
Expand Down
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@ language: php
os: linux
dist: xenial

git:
depth: false

php:
- 7.2
- 7.3
- 7.4
- 8.0
- nightly

jobs:
fast_finish: true
allow_failures:
- php: 8.0
- php: nightly

env:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif
update: ##@Project Install/Update all 3rd party dependencies
$(call title,"Install/Update all 3rd party dependencies")
@echo "Composer flags: $(JBZOO_COMPOSER_UPDATE_FLAGS)"
@composer update $(JBZOO_COMPOSER_UPDATE_FLAGS)
@composer update --no-progress $(JBZOO_COMPOSER_UPDATE_FLAGS)


test-all: ##@Project Run all project tests at once
Expand Down
33 changes: 15 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
{
"name" : "jbzoo/less",
"type" : "library",
"description" : "PHP wrapper for any less-compilers",
"license" : "MIT",
"keywords" : [
"name" : "jbzoo/less",
"type" : "library",
"description" : "PHP wrapper for any less-compilers",
"license" : "MIT",
"keywords" : [
"less", "css", "less.js", "stylesheet",
"jbzoo", "packagist", "lessc", "gpeasy", "leafo", "lesscss", "compiler"
],
"authors" : [
"authors" : [
{
"name" : "Denis Smetannikov",
"email" : "[email protected]",
"role" : "lead"
}
],

"require" : {
"require" : {
"php" : ">=7.2",

"jbzoo/data" : "^4.2.0",
"jbzoo/utils" : "^4.3.0",
"jbzoo/data" : "^4.3.0",
"jbzoo/utils" : "^4.5.0",
"wikimedia/less.php" : "^3.1.0"
},

"require-dev" : {
"jbzoo/toolbox-dev" : "^2.10.0"
"require-dev" : {
"jbzoo/toolbox-dev" : "^2.13.1"
},

"autoload" : {
"autoload" : {
"psr-4" : {
"JBZoo\\Less\\" : "src"
}
},

"minimum-stability" : "dev",
"prefer-stable" : true,

"autoload-dev" : {
"autoload-dev" : {
"classmap" : ["tests"]
},

"config" : {
"config" : {
"optimize-autoloader" : true
},

"extra" : {
"extra" : {
"branch-alias" : {
"dev-master" : "4.x-dev"
}
Expand Down

0 comments on commit 71d9844

Please sign in to comment.