mirror of
https://github.com/danog/psalm-plugin-symfony.git
synced 2024-11-30 04:29:10 +01:00
103 lines
2.7 KiB
YAML
103 lines
2.7 KiB
YAML
name: "Integrate"
|
|
|
|
on:
|
|
pull_request: ~
|
|
push:
|
|
branches:
|
|
- master
|
|
schedule:
|
|
- cron: "0 10 * * *"
|
|
|
|
jobs:
|
|
static-code-analysis:
|
|
name: "Static Code Analysis (PHP: ${{matrix.php-version}}, deps: ${{matrix.dependencies}})"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version:
|
|
- 8.0
|
|
- 8.1
|
|
|
|
dependencies:
|
|
- highest
|
|
- lowest
|
|
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "Install PHP with extensions"
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
coverage: none
|
|
php-version: ${{ matrix.php-version }}
|
|
|
|
- name: Install Composer dependencies
|
|
uses: ramsey/composer-install@v1
|
|
with:
|
|
dependency-versions: ${{ matrix.dependencies }}
|
|
|
|
- name: "Cache cache directory for vimeo/psalm"
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: .build/psalm
|
|
key: php-${{ matrix.php-version }}-psalm-${{ github.sha }}
|
|
restore-keys: php-${{ matrix.php-version }}-psalm-
|
|
|
|
- name: "Run vimeo/psalm"
|
|
run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=${{ matrix.php-version }}
|
|
if: matrix.php-version != '8.0'
|
|
|
|
- name: "Run vimeo/psalm"
|
|
run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=8.0
|
|
if: matrix.php-version == '8.0'
|
|
|
|
tests:
|
|
name: "Tests (PHP: ${{matrix.php-version}}, Symfony: ${{matrix.symfony-version}})"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version:
|
|
- 8.0
|
|
- 8.1
|
|
|
|
symfony-version:
|
|
- 5
|
|
- 6
|
|
|
|
exclude:
|
|
- php-version: 8.0
|
|
symfony-version: 6
|
|
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "Install PHP with extensions"
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
coverage: none
|
|
php-version: ${{ matrix.php-version }}
|
|
tools: flex
|
|
|
|
- name: "Restrict symfony dependencies to the correct version"
|
|
run: composer config extra.symfony.require ${{ matrix.symfony-version }}.*
|
|
|
|
- name: Install Composer dependencies
|
|
uses: ramsey/composer-install@v1
|
|
|
|
- name: "Run unit tests with phpunit"
|
|
run: vendor/bin/phpunit --configuration=phpunit.xml
|
|
|
|
- name: "Build acceptance tests with codeception"
|
|
run: vendor/bin/codecept build
|
|
|
|
- name: "Run acceptance tests with codeception"
|
|
run: vendor/bin/codecept run -v -g symfony-common -g symfony-${{ matrix.symfony-version }}
|