Skip to content

[CLEANUP] Fix indentation of GHA configuration #548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 120 additions & 120 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
100 changes: 50 additions & 50 deletions .github/workflows/codecoverage.yml
Original file line number Diff line number Diff line change
@@ -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