Skip to content

Commit

Permalink
Merge pull request #288 from driehle/upstream-workflows
Browse files Browse the repository at this point in the history
Updated upstream workflows
  • Loading branch information
driehle authored Dec 29, 2024
2 parents 105d86f + 1efd3aa commit f127f14
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 32 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/coding-standards.yml"
- "composer.*"
- "src/**"
- "phpcs.xml.dist"
- "tests/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/coding-standards.yml"
- "composer.*"
- "src/**"
- "phpcs.xml.dist"
- "tests/**"

jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@3.0.0"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0"
with:
php-version: '8.3'
php-version: "8.3"
4 changes: 3 additions & 1 deletion .github/workflows/composer-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ on:
branches:
- "*.x"
paths:
- ".github/workflows/composer-lint.yml"
- "composer.json"
push:
branches:
- "*.x"
paths:
- ".github/workflows/composer-lint.yml"
- "composer.json"

jobs:
composer-lint:
name: "Composer Lint"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@3.0.0"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@6.0.0"
with:
php-version: "8.3"
47 changes: 37 additions & 10 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/continuous-integration.yml"
- "composer.*"
- "src/**"
- "phpunit.xml.dist"
- "tests/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/continuous-integration.yml"
- "composer.*"
- "src/**"
- "phpunit.xml.dist"
- "tests/**"

jobs:
phpunit:
Expand Down Expand Up @@ -39,23 +51,36 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Install PHP"
- name: "Install PHP with PCOV"
uses: "shivammathur/setup-php@v2"
if: "${{ matrix.php-version != '7.1' }}"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
extensions: "mongodb"

- name: "Install PHP with XDebug"
uses: "shivammathur/setup-php@v2"
if: "${{ matrix.php-version == '7.1' }}"
with:
php-version: "${{ matrix.php-version }}"
coverage: "xdebug"
ini-values: "zend.assertions=1"

- name: "Set COMPOSER_ROOT_VERSION"
run: |
echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
if: "${{ inputs.composer-root-version }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"
composer-options: "${{ inputs.composer-options }}"

- name: "Configure test application"
run: "cp ./tests/TestConfiguration.php ./config/application.config.php"
Expand All @@ -70,9 +95,9 @@ jobs:
run: "./vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v4"
with:
name: "phpunit-${{ matrix.php-version }}.coverage"
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}.coverage"
path: "coverage.xml"

upload_coverage:
Expand All @@ -83,16 +108,18 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v4.1.7"
uses: "actions/download-artifact@v4"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
uses: "codecov/codecov-action@v5"
with:
directory: "reports"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
20 changes: 20 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Documentation"

on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/documentation.yml"
- "docs/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/documentation.yml"
- "docs/**"

jobs:
documentation:
name: "Documentation"
uses: "doctrine/.github/.github/workflows/documentation.yml@6.0.0"
28 changes: 28 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Static Analysis"

on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/phpstan.yml"
- "composer.*"
- "src/**"
- "phpstan*"
- "tests/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/phpstan.yml"
- "composer.*"
- "src/**"
- "phpstan*"
- "tests/**"

jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/phpstan.yml@6.0.0"
with:
php-version: "8.3"
6 changes: 3 additions & 3 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@3.0.0"
with:
use-next-minor-as-default-branch: true
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@6.0.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
with:
use-next-minor-as-default-branch: true # defaults to false
16 changes: 0 additions & 16 deletions .github/workflows/static-analysis.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/en/sidebar.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:orphan:
.. toctree::
:depth: 3

Expand Down

0 comments on commit f127f14

Please sign in to comment.