-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions workflow to automatically test for php versions 7.…
…0 to 7.4 on push and pr
- Loading branch information
1 parent
bc0f997
commit d6b6b3f
Showing
1 changed file
with
36 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,36 @@ | ||
name: PHP 7.* Tests | ||
|
||
on: | ||
push: # Trigger on code pushes | ||
branches: | ||
- master | ||
pull_request: # Trigger on pull requests | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [7.0, 7.1, 7.2, 7.3, 7.4] # Define the PHP versions to test | ||
|
||
steps: | ||
# Step 1: Check out the repository | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up PHP | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, xml, curl | ||
coverage: none # Skip code coverage tools for faster testing | ||
|
||
# Step 3: Install Dependencies | ||
- name: Install Dependencies | ||
run: composer install --no-progress --no-suggest | ||
|
||
# Step 4: Run Tests | ||
- name: Run PHPUnit Tests | ||
run: vendor/bin/phpunit |