Skip to content

Instantly share code, notes, and snippets.

@osteel
Created July 2, 2022 12:48
Show Gist options
  • Save osteel/9b2dbab1db704ce353bbc5452abc5764 to your computer and use it in GitHub Desktop.
Save osteel/9b2dbab1db704ce353bbc5452abc5764 to your computer and use it in GitHub Desktop.
PHP compatibility demo – complete workflow
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependency-versions:
- "lowest"
- "highest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install composer dependencies
uses: "ramsey/composer-install@v2"
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: Run PHPUnit
run: vendor/bin/phpunit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment