Skip to content

Fix GitHub actions config #146

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
Dec 30, 2022
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
47 changes: 22 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set PHP Version
run: sudo update-alternatives --set php /usr/bin/php7.4
- name: 'Checkout code'
uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v2
- name: 'Install PHP'
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 7.4
tools: composer:v2
ini-values: date.timezone=UTC

- name: Validate
run: composer validate --strict
- name: Validate composer.json file
run: composer validate --strict

stable-tests:
name: Stable Tests
Expand All @@ -29,27 +34,19 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0' ]
php-version: ['7.4', '8.0']

steps:
- name: Set PHP Version
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }}

- name: Get PHP Version
run: |
ver=$(php -v | grep -oP '(?<=PHP )\d.\d')
echo "::set-output name=version::$ver"
id: php-ver

- name: Using PHP Version from matrix
run: |
echo "Runner is not using PHP Version defined in the php-versions matrix."
php -v
exit 1
if: steps.php-ver.outputs.version != matrix.php-versions

- name: Checkout
uses: actions/checkout@v2
- name: 'Checkout code'
uses: actions/checkout@v3

- name: 'Install PHP'
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: composer:v2
ini-values: date.timezone=UTC

- name: Install Composer Dependencies
run: composer install --no-progress
Expand Down