Skip to content

Commit

Permalink
minor #398 Use remote GitHub CI config files (bocharsky-bw)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the master branch.

Discussion
----------

Use remote GitHub CI config files

https://github.com/orgs/SymfonyCasts/projects/7/views/1?sortedBy%5Bdirection%5D=asc&sortedBy%5BcolumnId%5D=33394902&pane=issue&itemId=21066810

~We drop PHP 7.2 & 7.3 support here but we support those versions on other repos like VerifyEmailBundle and ResetPasswordBundle so that's why tests failed. I winder if we should drop 7.2/7.3 support there as well? Probably the easiest. Otherwise, we need a workaround for this in our global GitHub CI config files~

UPD it's possible to override matrix now

Commits
-------

deb08f8 Use remote GitHub CI config files
  • Loading branch information
weaverryan committed Mar 27, 2023
2 parents f022a33 + deb08f8 commit 105085b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 113 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/check-readme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check README.md is in sync

on:
pull_request:
push:
branches: [ master ]

jobs:
# Fail CI if repo is in dirty state after bin/update_readme
update-readme:
name: bin/update_readme
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2

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

- name: Check status
run: ./bin/update_readme && git diff --exit-code README.md
61 changes: 19 additions & 42 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
name: Bundle CI
name: CI

on:
push:
branches: ['main']
pull_request:
schedule:
- cron: '0 */12 * * *'
pull_request: ~
push:
branches: ['main']
schedule:
- cron: '0 */12 * * *'

jobs:
test:
uses: SymfonyCasts/.github/.github/workflows/phpunit.yaml@main
with:
php-version-matrix: '["7.4", "8.0", "8.1", "8.2"]'
php-version-lowest: '7.4'

tests:
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}"
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
# normal, highest, non-dev installs
php-version: ['7.4', '8.0', '8.1', '8.2']
composer-options: ['--prefer-stable']
dependency-versions: ['highest']
include:
# testing lowest php with lowest dependencies
- php-version: '7.4'
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: "Checkout code"
uses: "actions/checkout@v2"
composer-validate:
uses: SymfonyCasts/.github/.github/workflows/composer-validate.yaml@main

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
cs:
uses: SymfonyCasts/.github/.github/workflows/php-cs-fixer.yaml@main

- name: "Composer install"
uses: "ramsey/composer-install@v1"
sca:
uses: SymfonyCasts/.github/.github/workflows/phpstan.yaml@main
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-progress"

- name: Run PHPUnit tests
run: "SYMFONY_PHPUNIT_VERSION=${{ matrix.phpunit-version }} ./vendor/bin/simple-phpunit"
php: '8.0'
70 changes: 0 additions & 70 deletions .github/workflows/static-analysis.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</php>

<testsuites>
<testsuite name="Test suite">
<testsuite name="unit">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
Expand Down

0 comments on commit 105085b

Please sign in to comment.