Skip to content

Commit

Permalink
TASK: GH Workflow: Use matrix for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nostadt committed Aug 10, 2023
1 parent 567a654 commit 6c24068
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,18 @@ jobs:
- name: "Normalize"
run: composer normalize

phpunit81:
phpunit:
strategy:
matrix:
version: [ /usr/bin/php8.1, /usr/bin/php8.2 ]
runs-on: ubuntu-20.04
name: "PHPUnit with PHP 8.1"
name: "PHPUnit with ${{ matrix.version }}"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Switch default PHP Version to 8.1"
run: sudo update-alternatives --set php /usr/bin/php8.1

- name: "Print PHP version"
run: php --version

- name: "Install Composer dependencies"
run: composer install

- name: "PHPUnit"
run: vendor/bin/phpunit

phpunit82:
runs-on: ubuntu-20.04
name: "PHPUnit with PHP 8.2"
steps:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Switch default PHP Version to 8.2"
run: sudo update-alternatives --set php /usr/bin/php8.2
- name: "Switch default PHP to: ${{ matrix.version }}"
run: sudo update-alternatives --set php ${{ matrix.version }}

- name: "Print PHP version"
run: php --version
Expand All @@ -70,4 +54,4 @@ jobs:
run: composer install

- name: "PHPUnit"
run: vendor/bin/phpunit
run: vendor/bin/phpunit

0 comments on commit 6c24068

Please sign in to comment.