Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Actions #1069

Merged
merged 2 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
pull_request:
branches: [ master ]
push:
branches: [ master ]

jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '7.3'
- '7.4'
symfony-versions: [false]
include:
- description: 'Symfony 3.4'
php: '7.4'
symfony-versions: 3.4.*
- description: 'Symfony 4.4'
php: '7.4'
symfony-versions: 4.4.*
- description: 'Symfony 5.0'
php: '7.4'
symfony-versions: 5.0.*
- description: 'Symfony 5.2'
php: '7.4'
symfony-versions: 5.2.*

name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: ${{ matrix.php }}-${{ matrix.symfony-versions }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Install dependencies
run: composer require "symfony/symfony:${{ matrix.symfony-versions }}" --no-update
if: matrix.symfony-versions

- name: Install dependencies
run: composer install

- name: Run PHPUnit tests
run: bin/phpunit
45 changes: 45 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Code style and static analysis

on:
pull_request:
push:
branches: [ master, 2.x, 1.x ]

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

# run phpcs
# - name: Run script
# run: vendor/bin/phpcs

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

## run PHPStan
# - name: Run script
# run: vendor/bin/phpstan analyse