From 74db3edd93281fe27799b528923eb7fee409b5a9 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Mon, 17 Jun 2024 14:00:29 +0200 Subject: [PATCH] [CLEANUP] Fix indentation of GHA configuration Rewrite the GHA config files using the project style conventions of four spaces as defined in `.editorconfig`. Signed-off-by: Daniel Ziegenberg --- .github/workflows/ci.yml | 240 ++++++++++++++--------------- .github/workflows/codecoverage.yml | 100 ++++++------ 2 files changed, 170 insertions(+), 170 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f64e7944..647996ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,127 +1,127 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions on: - push: - branches: - - main - pull_request: - schedule: - - cron: '3 3 * * 1' + push: + branches: + - main + pull_request: + schedule: + - cron: '3 3 * * 1' name: CI jobs: - php-lint: - name: PHP Lint - runs-on: ubuntu-22.04 - strategy: - matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - ini-file: development - coverage: none - - - name: PHP Lint - run: find src tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l - - unit-tests: - name: Unit tests - - runs-on: ubuntu-22.04 - - needs: [ php-lint ] - - strategy: - fail-fast: false - matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - ini-file: development - tools: composer:v2 - coverage: none - - - name: Show the Composer configuration - run: composer config --global --list - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ~/.cache/composer - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install Composer dependencies - run: | - composer update --with-dependencies --no-progress; - composer show; - - - name: Run Tests - run: ./vendor/bin/phpunit - - static-analysis: - name: Static Analysis - - runs-on: ubuntu-22.04 - - needs: [ php-lint ] - - strategy: - fail-fast: false - matrix: - command: - - fixer - - stan - php-version: - - '8.3' - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - ini-file: development - tools: "composer:v2, phive" - coverage: none - - - name: Show the Composer configuration - run: composer config --global --list - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ~/.cache/composer - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install Composer dependencies - run: | - composer update --with-dependencies --no-progress; - composer show; - - - name: Install development tools - run: | - phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E - - - name: Run Command - run: composer ci:php:${{ matrix.command }} + php-lint: + name: PHP Lint + runs-on: ubuntu-22.04 + strategy: + matrix: + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-file: development + coverage: none + + - name: PHP Lint + run: find src tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l + + unit-tests: + name: Unit tests + + runs-on: ubuntu-22.04 + + needs: [ php-lint ] + + strategy: + fail-fast: false + matrix: + php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-file: development + tools: composer:v2 + coverage: none + + - name: Show the Composer configuration + run: composer config --global --list + + - name: Cache dependencies installed with composer + uses: actions/cache@v4 + with: + path: ~/.cache/composer + key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer- + + - name: Install Composer dependencies + run: | + composer update --with-dependencies --no-progress; + composer show; + + - name: Run Tests + run: ./vendor/bin/phpunit + + static-analysis: + name: Static Analysis + + runs-on: ubuntu-22.04 + + needs: [ php-lint ] + + strategy: + fail-fast: false + matrix: + command: + - fixer + - stan + php-version: + - '8.3' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-file: development + tools: "composer:v2, phive" + coverage: none + + - name: Show the Composer configuration + run: composer config --global --list + + - name: Cache dependencies installed with composer + uses: actions/cache@v4 + with: + path: ~/.cache/composer + key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer- + + - name: Install Composer dependencies + run: | + composer update --with-dependencies --no-progress; + composer show; + + - name: Install development tools + run: | + phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E + + - name: Run Command + run: composer ci:php:${{ matrix.command }} diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index 2bb9cafb..7a094fdc 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -1,57 +1,57 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions on: - push: - branches: - - main - pull_request: + push: + branches: + - main + pull_request: name: Code coverage jobs: - code-coverage: - name: Code coverage - - runs-on: ubuntu-22.04 - - strategy: - matrix: - php-version: [ '7.4' ] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - ini-file: development - tools: composer:v2 - coverage: xdebug - - - name: Show the Composer configuration - run: composer config --global --list - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ~/.cache/composer - key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php-version }}-composer- - - - name: Install Composer dependencies - run: | - composer update --with-dependencies --no-progress; - composer show; - - - name: Run Tests - run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml - - - name: Upload coverage results to Codacy - env: - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - if: "${{ env.CODACY_PROJECT_TOKEN != '' }}" - run: | - ./vendor/bin/codacycoverage clover build/coverage/xml + code-coverage: + name: Code coverage + + runs-on: ubuntu-22.04 + + strategy: + matrix: + php-version: [ '7.4' ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-file: development + tools: composer:v2 + coverage: xdebug + + - name: Show the Composer configuration + run: composer config --global --list + + - name: Cache dependencies installed with composer + uses: actions/cache@v4 + with: + path: ~/.cache/composer + key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer- + + - name: Install Composer dependencies + run: | + composer update --with-dependencies --no-progress; + composer show; + + - name: Run Tests + run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml + + - name: Upload coverage results to Codacy + env: + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + if: "${{ env.CODACY_PROJECT_TOKEN != '' }}" + run: | + ./vendor/bin/codacycoverage clover build/coverage/xml