Skip to content

Commit

Permalink
Add github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanvelzen committed Dec 10, 2021
1 parent 60f029f commit 94bdd12
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: Main
on:
- push
- pull_request

jobs:
tests:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php-version }} tests with ${{ matrix.dependencies }} dependencies
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
dependencies:
- lowest
- highest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: composer:v2

- name: Install lowest dependencies with composer
if: matrix.dependencies == 'lowest'
run: composer update --no-ansi --no-interaction --no-progress --prefer-lowest

- name: Install highest dependencies with composer
if: matrix.dependencies == 'highest'
run: composer update --no-ansi --no-interaction --no-progress

- name: PHPUnit
run: php vendor/bin/phpunit

0 comments on commit 94bdd12

Please sign in to comment.