Skip to content

Commit

Permalink
TASK: Update .github/workflows/default.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nostadt committed Feb 14, 2024
1 parent 5e6a77c commit 96abce3
Showing 1 changed file with 48 additions and 36 deletions.
84 changes: 48 additions & 36 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,71 @@ on: [ push ]

jobs:
phpstan:
runs-on: ubuntu-20.04
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v3
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- { php: 8.3 }

- name: Switch default PHP Version to 8.3
run: sudo update-alternatives --set php /usr/bin/php8.3
name: "Run PHPStan with PHP ${{ matrix.php-versions.php }}"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions.php }}"
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Composer dependencies
run: composer install
- uses: "ramsey/composer-install@v2"

- name: PHPStan
- name: "Run PHPStan"
run: vendor/bin/phpstan

composer_normalize:
runs-on: ubuntu-20.04
name: composer normalize
steps:
- name: Checkout
uses: actions/checkout@v3
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- { php: 8.3 }

- name: Switch default PHP Version to 8.3
run: sudo update-alternatives --set php /usr/bin/php8.3
name: "Run composer normalize with PHP ${{ matrix.php-versions.php }}"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions.php }}"
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Composer dependencies
run: composer install
- uses: "ramsey/composer-install@v2"

- name: Normalize
- name: "Run composer normalize"
run: composer normalize

phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- /usr/bin/php8.2
- /usr/bin/php8.3
runs-on: ubuntu-20.04
name: "PHPUnit with ${{ matrix.version }}"
steps:
- name: "Checkout"
uses: actions/checkout@v3
php-versions:
- { php: 8.2 }
- { php: 8.3 }

- name: "Switch default PHP to: ${{ matrix.version }}"
run: sudo update-alternatives --set php ${{ matrix.version }}
name: "Run PHPUnit with PHP ${{ matrix.php-versions.php }}"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions.php }}"
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Install Composer dependencies"
run: composer install
- uses: "ramsey/composer-install@v2"

- name: "Print versions"
- name: "Print versions and run"
run: |
php --version
vendor/bin/phpunit --version
- name: "PHPUnit"
run: vendor/bin/phpunit
vendor/bin/phpunit

0 comments on commit 96abce3

Please sign in to comment.