psalm-plugin-symfony/.github/workflows/integrate.yaml

132 lines
3.5 KiB
YAML
Raw Normal View History

2020-03-13 16:54:07 +01:00
name: "Integrate"
on:
pull_request: ~
push:
branches:
- master
2020-10-15 11:06:13 +02:00
schedule:
- cron: "0 10 * * *"
2020-03-13 16:54:07 +01:00
jobs:
static-code-analysis:
2021-06-19 10:16:18 +02:00
name: "Static Code Analysis (PHP: ${{matrix.php-version}}, deps: ${{matrix.dependencies}})"
2020-03-13 16:54:07 +01:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
2020-03-13 16:54:07 +01:00
matrix:
php-version:
- 7.3
- 7.4
- 8.0
2020-03-13 16:54:07 +01:00
dependencies:
- highest
- lowest
exclude:
- php-version: 7.3
dependencies: lowest
- php-version: 7.4
dependencies: lowest
2020-03-13 16:54:07 +01:00
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 }}
2021-06-19 10:16:18 +02:00
- name: Install Composer dependencies
uses: ramsey/composer-install@v1
2020-03-13 16:54:07 +01:00
with:
dependency-versions: ${{ matrix.dependencies }}
2020-03-13 16:54:07 +01:00
- 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-
2020-03-13 16:54:07 +01:00
- 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'
2020-03-13 16:54:07 +01:00
tests:
2021-06-19 10:16:18 +02:00
name: "Tests (PHP: ${{matrix.php-version}}, Symfony: ${{matrix.symfony-version}})"
2020-03-13 16:54:07 +01:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
2020-03-13 16:54:07 +01:00
matrix:
php-version:
- 7.1
- 7.2
2020-03-13 16:54:07 +01:00
- 7.3
- 7.4
- 8.0
2020-03-13 16:54:07 +01:00
symfony-version:
- 4
- 5
- 6
exclude:
- php-version: 7.1
symfony-version: 5
- php-version: 7.1
symfony-version: 6
- php-version: 7.2
symfony-version: 6
- php-version: 7.3
symfony-version: 6
- php-version: 7.4
symfony-version: 6
- php-version: 7.1
symfony-version: 6
- php-version: 8.0
symfony-version: 3
- php-version: 8.0
symfony-version: 6
2020-03-13 16:54:07 +01:00
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
2020-03-13 16:54:07 +01:00
- name: "Restrict symfony dependencies to the correct version"
run: composer config extra.symfony.require ${{ matrix.symfony-version }}.*
2021-06-19 10:16:18 +02:00
- name: Install Composer dependencies
uses: ramsey/composer-install@v1
2020-03-13 16:54:07 +01:00
- 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 }}
- name: "Run acceptance tests with codeception PHP8 only tests"
run: vendor/bin/codecept run -v -g php-8
if: matrix.php-version == '8.0'