Skip to content
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

TASK: Update .github/workflows/default.yml #15

Merged
merged 2 commits into from
Feb 14, 2024
Merged
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
74 changes: 38 additions & 36 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,61 @@ on: [ push ]

jobs:
phpstan:
runs-on: ubuntu-20.04
name: PHPStan
runs-on: ubuntu-latest
name: "Run PHPStan with PHP 8.3"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Switch default PHP Version to 8.3
run: sudo update-alternatives --set php /usr/bin/php8.3
- uses: "ramsey/composer-install@v2"

- name: Install Composer dependencies
run: composer install

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

composer_normalize:
runs-on: ubuntu-20.04
name: composer normalize
runs-on: ubuntu-latest
name: "Run composer normalize with PHP 8.3"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Switch default PHP Version to 8.3
run: sudo update-alternatives --set php /usr/bin/php8.3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
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
Loading