Skip to content

Commit

Permalink
[TASK] Format yaml files according to code style rules
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Nov 1, 2020
1 parent c637cd6 commit f38801f
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 160 deletions.
15 changes: 11 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
; top-most EditorConfig file
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

; Unix-style newlines
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# ReST-Files
[*.rst]
indent_size = 3
max_line_length = 80

[*.{yaml,yml}]
indent_size = 2
82 changes: 41 additions & 41 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,44 @@ name: Build Phar

on: [push]
jobs:
build:
name: Build Phar
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Box global
run: composer global require "humbug/box:^3.8" --no-ansi --no-interaction --no-progress --classmap-authoritative

- name: Install Composer Dependencies
run: composer install --no-ansi --no-interaction --no-dev --no-progress --classmap-authoritative

- name: Compile Phar with Box
run: box compile

- name: Run surf.phar once
run: release/surf.phar --version

- name: Upload Surf Phar
uses: actions/upload-artifact@v1
with:
name: Surf Phar
path: release/surf.phar
build:
name: Build Phar
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Box global
run: composer global require "humbug/box:^3.8" --no-ansi --no-interaction --no-progress --classmap-authoritative

- name: Install Composer Dependencies
run: composer install --no-ansi --no-interaction --no-dev --no-progress --classmap-authoritative

- name: Compile Phar with Box
run: box compile

- name: Run surf.phar once
run: release/surf.phar --version

- name: Upload Surf Phar
uses: actions/upload-artifact@v1
with:
name: Surf Phar
path: release/surf.phar
56 changes: 28 additions & 28 deletions .github/workflows/code_coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Code Coverage

on:
pull_request: null
push:
branches:
- master
pull_request: null
push:
branches:
- master

jobs:
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none

- run: composer install --no-progress
- run: composer install --no-progress

- run: |
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit --coverage-clover build/logs/clover.xml
# Coveralls.io
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
php php-coveralls.phar --verbose
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- run: |
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit --coverage-clover build/logs/clover.xml
# Coveralls.io
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
php php-coveralls.phar --verbose
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
84 changes: 42 additions & 42 deletions .github/workflows/php_cs_fixer.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Format (PHP)

on:
pull_request:
branches:
- master
- 2.0
pull_request:
branches:
- master
- 2.0

jobs:
php-cs-fixer:
runs-on: ubuntu-latest
# dont run jobs on forks, because we are not allowed to commit
if: github.event.pull_request.draft == false && github.repository == 'TYPO3/Surf'

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PHP_CS_FIXER }}
ref: ${{ github.head_ref }}

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none # disable xdebug, pcov

- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer Dependencies
run: composer install --no-progress

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix --config=./.php_cs --diff

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}
php-cs-fixer:
runs-on: ubuntu-latest
# dont run jobs on forks, because we are not allowed to commit
if: github.event.pull_request.draft == false && github.repository == 'TYPO3/Surf'

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PHP_CS_FIXER }}
ref: ${{ github.head_ref }}

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none # disable xdebug, pcov

- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer Dependencies
run: composer install --no-progress

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix --config=./.php_cs --diff

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}
49 changes: 27 additions & 22 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
name: Static Analysis

on:
pull_request: null
push:
branches:
- master
pull_request: null
push:
branches:
- master

jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none
- run: composer install --no-progress
- run: composer phpstan
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none

- run: composer install --no-progress

- run: composer phpstan

0 comments on commit f38801f

Please sign in to comment.