Skip to content

Commit

Permalink
Add github actions workflow to automatically test for php versions 7.…
Browse files Browse the repository at this point in the history
…0 to 7.4 on push and pr
  • Loading branch information
jimmerioles committed Dec 2, 2024
1 parent bc0f997 commit d6b6b3f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/php-tests.yml
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

0 comments on commit d6b6b3f

Please sign in to comment.