-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Improve CI inspired by TYPO3 EXT:tea
- Loading branch information
1 parent
d7f5d0a
commit af66a2f
Showing
8 changed files
with
267 additions
and
248 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
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,16 +1,14 @@ | ||
version: 2 | ||
|
||
updates: | ||
- | ||
package-ecosystem: composer | ||
directory: "/" | ||
open-pull-requests-limit: 5 | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: composer | ||
directory: "/" | ||
open-pull-requests-limit: 5 | ||
schedule: | ||
interval: monthly | ||
|
||
- | ||
package-ecosystem: github-actions | ||
directory: "/" | ||
open-pull-requests-limit: 5 | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
open-pull-requests-limit: 5 | ||
schedule: | ||
interval: monthly |
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,55 +1,54 @@ | ||
name: Code Analysis | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: null | ||
push: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
|
||
jobs: | ||
code_analysis: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: [ 7.4, 8.0, 8.1 ] | ||
actions: | ||
- | ||
name: "PHP Linter" | ||
run: vendor/bin/parallel-lint src config tests | ||
|
||
- | ||
name: 'Composer Validate' | ||
run: composer validate --ansi | ||
|
||
- | ||
name: 'Tests' | ||
run: vendor/bin/phpunit | ||
|
||
- | ||
name: 'Check TYPO3 Rector configs' | ||
run: composer check-typo3-rector | ||
|
||
- | ||
name: 'PHPStan' | ||
run: composer analyze | ||
|
||
name: "${{ matrix.php-versions }} ${{ matrix.actions.name }}" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# see https://github.com/shivammathur/setup-php | ||
- | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
|
||
- run: ${{ matrix.actions.run }} | ||
code_analysis: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: [ 7.4, 8.0, 8.1 ] | ||
actions: | ||
- name: "PHP Linter" | ||
run: "composer ci:php:lint" | ||
|
||
- name: 'Composer Validate' | ||
run: composer validate --strict --ansi | ||
|
||
- name: 'Tests' | ||
run: vendor/bin/phpunit | ||
|
||
- name: 'Check TYPO3 Rector configs' | ||
run: "composer ci:check-typo3-rector" | ||
|
||
- name: 'PHPStan' | ||
run: "composer ci:php:stan" | ||
|
||
name: "${{ matrix.php-versions }} ${{ matrix.actions.name }}" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
|
||
# see https://github.com/shivammathur/setup-php | ||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
|
||
# see https://github.com/ramsey/composer-install | ||
- name: "Install Composer dependencies" | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: "Run command" | ||
run: ${{ matrix.actions.run }} |
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,44 +1,48 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
push: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# see https://github.com/ramsey/composer-install | ||
- uses: "ramsey/composer-install@v2" | ||
|
||
- name: Install rule doc generator | ||
run: composer require symplify/rule-doc-generator:^11.1 --with-all-dependencies | ||
|
||
- name: Generate documentation | ||
run: composer docs | ||
|
||
- name: Uninstall rule doc generator | ||
run: composer remove symplify/rule-doc-generator | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5.0.0 | ||
with: | ||
commit_message: '[DOCS] Generate documentation' | ||
commit_options: '--no-verify --signoff' | ||
branch: "main" | ||
push_options: '--force' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# see https://github.com/ramsey/composer-install | ||
- name: "Install Composer dependencies" | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: "Install rule doc generator" | ||
run: composer require symplify/rule-doc-generator:^11.1 --with-all-dependencies | ||
|
||
- name: "Generate documentation" | ||
run: "composer docs:generate" | ||
|
||
- name: "Uninstall rule doc generator" | ||
run: composer remove symplify/rule-doc-generator | ||
|
||
- name: "Commit documentation" | ||
uses: stefanzweifel/git-auto-commit-action@v5.0.0 | ||
with: | ||
commit_message: '[DOCS] Generate documentation' | ||
commit_options: '--no-verify --signoff' | ||
branch: "main" | ||
push_options: '--force' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Monthly Pull Requests | ||
|
||
on: | ||
schedule: | ||
# https://crontab.guru/every-month | ||
- cron: "0 0 1 * *" | ||
|
||
env: | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
|
||
jobs: | ||
weekly_pull_requests: | ||
# Don't run on forks. | ||
if: github.repository == 'sabbelasichon/typo3-rector' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
actions: | ||
- name: 'Apply Coding Standard' | ||
run: "composer fix:style" | ||
branch: 'automated-apply-coding-standards' | ||
|
||
name: ${{ matrix.actions.name }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
# see https://github.com/shivammathur/setup-php | ||
- name: "Install PHP" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
coverage: none | ||
|
||
- name: "Install Composer dependencies" | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: "Run command" | ||
run: ${{ matrix.actions.run }} | ||
|
||
# see https://github.com/peter-evans/create-pull-request | ||
- name: "Create pull-request" | ||
uses: peter-evans/create-pull-request@v5.0.2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "[AUTOMATED] ${{ matrix.actions.name }}" | ||
base: 'main' | ||
branch: ${{ matrix.actions.branch }} | ||
title: '[AUTOMATED] ${{ matrix.actions.name }}' | ||
delete-branch: true | ||
|
||
- name: "Enable Pull Request Automerge" | ||
if: steps.cpr.outputs.pull-request-operation == 'created' | ||
uses: peter-evans/enable-pull-request-automerge@v3 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | ||
merge-method: squash |
Oops, something went wrong.