-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #88 Simplifying CI matrix (weaverryan)
This PR was squashed before being merged into the main branch. Discussion ---------- Simplifying CI matrix Same as: SymfonyCasts/reset-password-bundle#192 Commits ------- 69b31b9 Simplifying CI matrix
- Loading branch information
Showing
2 changed files
with
51 additions
and
213 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,255 +1,94 @@ | ||
name: Verify Email Bundle | ||
name: Bundle CI | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
composer-validate: | ||
name: Validate composer.json | ||
static-analysis: | ||
name: Static Analysis | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: Validate | ||
run: composer validate --no-check-lock --strict | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "8.0" | ||
|
||
php-cs-fixer: | ||
name: Lint Bundle Source | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php7.4 | ||
- name: "Validate composer.json" | ||
run: "composer validate --strict --no-check-lock" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
- name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
composer-options: "--prefer-stable" | ||
dependency-versions: 'highest' | ||
|
||
- name: Install PHP-CS-Fixer | ||
run: composer global require friendsofphp/php-cs-fixer --prefer-dist --no-progress | ||
|
||
- name: Enforce coding standards | ||
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php-cs-fixer.dist.php --diff --dry-run | ||
|
||
psalm: | ||
name: Psalm Static Analysis | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php7.4 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-progress | ||
|
||
- name: Analyze Source | ||
- name: Running Pslam | ||
run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml | ||
|
||
stable-tests: | ||
name: Symfony Stable | ||
- name: Running php-cs-fixer | ||
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php-cs-fixer.dist.php --diff --dry-run | ||
|
||
tests: | ||
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}" | ||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.3', '7.4', '8.0'] | ||
symfony-version: ['4.4.*', '5.3.*'] | ||
# normal, highest, non-dev installs | ||
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1'] | ||
composer-options: ['--prefer-stable'] | ||
dependency-versions: ['highest'] | ||
include: | ||
# testing lowest PHP version with lowest dependencies | ||
- php-version: '7.2.5' | ||
dependency-versions: 'lowest' | ||
composer-options: '--prefer-lowest' | ||
|
||
# testing dev versions with highest PHP | ||
- php-version: '8.0' | ||
dependency-versions: 'highest' | ||
composer-options: '' # allow dev deps | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} | ||
|
||
- name: Get PHP Version | ||
run: | | ||
ver=$(php -v | grep -oP '(?<=PHP )\d.\d') | ||
echo "::set-output name=version::$ver" | ||
id: php-ver | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: Using PHP Version from matrix | ||
run: | | ||
echo "Runner is not using PHP Version defined in the php-versions matrix." | ||
php -v | ||
exit 1 | ||
if: steps.php-ver.outputs.version != matrix.php-versions | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: Install Global Dependencies | ||
run: | | ||
composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main | ||
- name: Install dependencies | ||
run: | | ||
composer config minimum-stability stable | ||
composer update --prefer-dist --no-progress | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | ||
|
||
- name: Unit Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit | ||
if: always() | ||
|
||
- name: Functional Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional | ||
if: always() | ||
|
||
- name: Integration Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration | ||
if: always() | ||
|
||
- name: Acceptance Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite acceptance | ||
if: always() | ||
|
||
dev-54-tests: | ||
name: Symfony 5.4 | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['8.0'] | ||
symfony-version: ['5.4.*', '6.0.*'] | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} | ||
|
||
- name: Get PHP Version | ||
run: | | ||
ver=$(php -v | grep -oP '(?<=PHP )\d.\d') | ||
echo "::set-output name=version::$ver" | ||
id: php-ver | ||
|
||
- name: Using PHP Version from matrix | ||
run: | | ||
echo "Runner is not using PHP Version defined in the php-versions matrix." | ||
php -v | ||
exit 1 | ||
if: steps.php-ver.outputs.version != matrix.php-versions | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer config minimum-stability beta | ||
composer update --prefer-dist --no-progress | ||
- name: Unit Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit | ||
if: always() | ||
|
||
- name: Functional Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional | ||
if: always() | ||
|
||
- name: Integration Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration | ||
if: always() | ||
|
||
- name: Acceptance Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite acceptance | ||
if: always() | ||
|
||
dev-main-tests: | ||
name: Symfony 5.x | ||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.3', '7.4', '8.0'] | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} | ||
|
||
- name: Get PHP Version | ||
run: | | ||
ver=$(php -v | grep -oP '(?<=PHP )\d.\d') | ||
echo "::set-output name=version::$ver" | ||
id: php-ver | ||
|
||
- name: Using PHP Version from matrix | ||
run: | | ||
echo "Runner is not using PHP Version defined in the php-versions matrix." | ||
php -v | ||
exit 1 | ||
if: steps.php-ver.outputs.version != matrix.php-versions | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-progress | ||
|
||
- name: Unit Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit | ||
if: always() | ||
|
||
- name: Functional Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional | ||
if: always() | ||
|
||
- name: Integration Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration | ||
if: always() | ||
|
||
- name: Acceptance Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite acceptance | ||
if: always() | ||
|
||
lowest-version-tests: | ||
name: Lowest dependencies | ||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.3', '7.4', '8.0'] | ||
|
||
steps: | ||
- name: Set PHP Version | ||
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} | ||
|
||
- name: Get PHP Version | ||
run: | | ||
ver=$(php -v | grep -oP '(?<=PHP )\d.\d') | ||
echo "::set-output name=version::$ver" | ||
id: php-ver | ||
|
||
- name: Using PHP Version from matrix | ||
run: | | ||
echo "Runner is not using PHP Version defined in the php-versions matrix." | ||
php -v | ||
exit 1 | ||
if: steps.php-ver.outputs.version != matrix.php-versions | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-lowest --prefer-dist --no-progress | ||
- name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependency-versions }}" | ||
composer-options: "--prefer-dist --no-progress" | ||
|
||
- name: Unit Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit | ||
if: always() | ||
|
||
- name: Functional Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional | ||
if: always() | ||
|
||
- name: Integration Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration | ||
if: always() | ||
|
||
- name: Acceptance Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite acceptance | ||
if: always() |
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