GH Actions: don't run cron job on forks #172
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
release: | |
types: [created] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: Build and test | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] | |
composer-flags: [ "" ] | |
symfony-version: [ "" ] | |
include: | |
- php: 7.2 | |
symfony-version: '3.*' | |
- php: 7.3 | |
symfony-version: '4.*' | |
- php: 7.4 | |
symfony-version: '5.*' | |
- php: 8.0 | |
symfony-version: '5.*' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
ini-file: "development" | |
coverage: none | |
- name: Update Symfony version | |
if: matrix.symfony-version != '' | |
run: composer require --no-update "symfony/symfony:${{ matrix.symfony-version }}" | |
- name: Install dependencies | |
run: composer update ${{ matrix.composer-flags }} | |
- name: Run tests (phpunit) | |
run: ./vendor/bin/phpunit |