Skip to content

Commit

Permalink
Merge pull request #111 from shopwareLabs/next-minor-v17
Browse files Browse the repository at this point in the history
Next minor
  • Loading branch information
JanPietrzyk authored Jun 11, 2021
2 parents 0a49266 + 20fc8be commit d192d3a
Show file tree
Hide file tree
Showing 89 changed files with 2,867 additions and 1,613 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: PHAR build

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "pcov"
ini-values: "zend.assertions=1"

- name: Prepare project
run: |
composer install
composer bin all install
- name: build phar
run: |
./psh build
cp build/psh.phar .
- name: Upload phar
uses: actions/upload-artifact@v2
with:
name: psh.phar
path: build/psh.phar

check:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"

- name: download psh
uses: actions/download-artifact@v2
with:
name: psh.phar
- shell: bash
run: chmod +x psh.phar

- name: execute example scripts
run: |
./psh.phar
./psh.phar test
./psh.phar test-env --env=ci
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI-Full

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "pcov"
ini-values: "zend.assertions=1"

- name: Prepare project
run: |
composer install
composer bin all install
- name: Check full
run: |
./psh ci
46 changes: 46 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI-Unit

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
deps:
- "locked"
- "lowest"
- "highest"
exclude:
- php-version: "8.0"
deps: "lowest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"

- name: Prepare project
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.deps }}"

- name: Check
run: |
./psh unit
7 changes: 6 additions & 1 deletion .php_cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->ignoreUnreadableDirs()
->exclude([
Expand Down Expand Up @@ -90,6 +91,10 @@ return PhpCsFixer\Config::create()
'less_and_greater' => false,
],
'nullable_type_declaration_for_default_null_value' => true,
'static_lambda' => true,
'linebreak_after_opening_tag' => false,
'php_unit_method_casing' => ['case' => 'snake_case'],
'visibility_required' => ['property', 'method', 'const'],
])
->setRiskyAllowed(true)
->setUsingCache(true)
Expand Down
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The minimum required file looks like this:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<psh xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/shopwareLabs/psh/blob/master/resource/config.xsd">
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopwareLabs/psh/master/resource/config.xsd">

</psh>
```
Expand Down Expand Up @@ -468,7 +468,10 @@ echo __PLACEHOLDER__

## Executing it

Executing the script will print a listing overview of all available commands
The general format is `./psh.phar <application-options> <script-names> <script-options>`. The only currently supported application option is `--no-header`, script names are a comma separated list of actions (or one) and script options are key value pairs to overwrite placeholders. Let's look at some examples:


Executing the phar will print a listing overview of all available commands

```sh
> ./psh.phar
Expand Down
2 changes: 1 addition & 1 deletion actions/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ bin/psalm
bin/php-cs-fixer fix
INCLUDE: unit.sh

phpdbg -qrr bin/infection --min-msi=80
bin/infection --min-msi=80
2 changes: 1 addition & 1 deletion actions/unit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# DESCRIPTION: Execute unit tests

phpdbg -qrr bin/phpunit --coverage-clover=./build/coverage.xml --coverage-html=./build/html-coverage
bin/phpunit --coverage-clover=./build/coverage.xml --coverage-html=./build/html-coverage
3 changes: 1 addition & 2 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
],
"files": [
"psh"
],
"stub": true
]
}
19 changes: 11 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@
"autoload": {
"psr-4": {
"Shopware\\Psh\\": "src"
}
},
"files": [
"resource/version.php"
]
},
"autoload-dev": {
"psr-4": {
"Shopware\\Psh\\Test\\": "tests"
}
},
"require": {
"php": "^7.2",
"php": "^7.2|^8.0",
"ext-dom": "*",
"symfony/finder": "^4.4",
"symfony/process": "^4.4",
"symfony/filesystem": "^4.4",
"symfony/yaml": "^4.4",
"symfony/finder": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0",
"symfony/filesystem": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0",
"league/climate": "^3.6",
"khill/php-duration": "^1.0",
"vlucas/phpdotenv": "^5.2",
"symfony/config": "^4.4"
"symfony/config": "^4.4|^5.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"friendsofphp/php-cs-fixer": "^2",
"phpunit/phpunit": "^8",
"phpunit/phpunit": "^8 || ^9",
"bamarni/composer-bin-plugin": "^1.4"
},
"license": "MIT",
Expand Down
Loading

0 comments on commit d192d3a

Please sign in to comment.