Move CI to GH actions and allow PHP 8 #10
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
on: | |
pull_request: ~ | |
push: | |
branches: | |
- master | |
jobs: | |
tests: | |
name: Test (PHP ${{ matrix.php }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: 7.4 | |
symfony: "^4" | |
coverage: true | |
- php: 7.4 | |
symfony: "^5" | |
# - php: 8.1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker compose | |
run: docker compose up -d && docker compose up --wait crossbar | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Restrict Symfony version | |
if: matrix.symfony | |
run: rm composer.lock && composer require "symfony/symfony:${{ matrix.symfony }}" --no-update | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run tests | |
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v3 | |
if: matrix.coverage | |
with: | |
file: build/coverage-report.xml |