I have just updated github workflows #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
package-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ["8.4","8.3","8.2","8.1","8.0", "7.4", "7.3"] | |
dependency-stability: ["prefer-stable"] | |
name: P${{ matrix.php-versions }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_ENV | |
- name: Cache Composer Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP versions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Install Dependencies | |
if: steps.vendor-cache.outputs.cache-hit != 'true' | |
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Update Dependencies | |
run: | | |
if [ "${{ matrix.dependency-stability }}" = "prefer-stable" ]; then | |
composer update --prefer-stable | |
elif [ "${{ matrix.dependency-stability }}" = "prefer-lowest" ]; then | |
composer update --prefer-stable --prefer-lowest | |
fi | |
- name: Show dir | |
run: pwd | |
- name: PHP Version | |
run: php --version | |
# Code quality | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
# Set environment | |
env: | |
SESSION_DRIVER: array | |
run: vendor/bin/phpunit --testdox |