-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create php-version-installation-pipeline.yml
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Check Composer Compatibility for PHP 8.0, 8.1, 8.2, 8.3, 8.4 | ||
|
||
on: | ||
push: | ||
branches: | ||
- php_version | ||
pull_request: | ||
branches: | ||
- php_version | ||
|
||
jobs: | ||
check-php-versions: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: [8.0, 8.1, 8.2, 8.3, 8.4] # Added PHP 8.0 to the matrix | ||
|
||
steps: | ||
# Step 1: Check out the code | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Step 2: Set up PHP version | ||
- name: Set up PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl, bcmath, curl, json # Add any required PHP extensions | ||
|
||
# Step 3: Install Composer | ||
- name: Install Composer | ||
run: curl -sS https://getcomposer.org/installer | php | ||
|
||
# Step 4: Install dependencies using Composer | ||
- name: Install dependencies with Composer | ||
run: php composer.phar install --no-progress --prefer-dist | ||
|
||
# Step 5: Run tests or any checks (optional) | ||
- name: Run PHPUnit tests (if applicable) | ||
run: vendor/bin/phpunit --configuration phpunit.xml.dist || true # Adjust as needed |