Skip to content

Commit

Permalink
Actions optimiert (#6079)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Apr 6, 2024
1 parent a35fab5 commit 4cf7cc3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/code-style.yml
Expand Up @@ -58,8 +58,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Fix code style
if: env.writable == 1
Expand Down Expand Up @@ -104,8 +102,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Fix code style
if: env.writable == 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remove-automerge-label.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
remove-automerge-label:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'automerge')
permissions:
contents: none

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/rexlint.yml
Expand Up @@ -27,8 +27,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Run rexlint
run: vendor/bin/rexlint
23 changes: 7 additions & 16 deletions .github/workflows/static-analysis.yml
Expand Up @@ -15,8 +15,7 @@ permissions:
contents: read

jobs:
psalm-analysis:
name: psalm static code analysis
psalm:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event_name != 'repository_dispatch' || github.event.client_payload.slash_command.args.unnamed.all == '' || contains(github.event.client_payload.slash_command.args.unnamed.all, 'psalm')
Expand Down Expand Up @@ -62,8 +61,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Run psalm analysis
if: github.event_name != 'repository_dispatch'
Expand All @@ -77,7 +74,7 @@ jobs:
- name: Git pull
if: failure() && steps.baseline.conclusion != 'skipped' && github.event_name == 'repository_dispatch'
run: git pull --rebase --autostash
run: git pull --ff-only --no-tags --depth=1

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -88,8 +85,7 @@ jobs:
commit_user_email: rex-bot@users.noreply.github.com
file_pattern: .tools/psalm/baseline.xml

psalm-taint-analysis:
name: psalm taint analysis
psalm-taint:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event.pull_request.draft == false && (github.event_name != 'repository_dispatch' || github.event.client_payload.slash_command.args.unnamed.all == '' || contains(github.event.client_payload.slash_command.args.unnamed.all, 'taint'))
Expand Down Expand Up @@ -135,8 +131,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Run psalm taint analysis
if: github.event_name != 'repository_dispatch'
Expand All @@ -150,7 +144,7 @@ jobs:
- name: Git pull
if: failure() && steps.baseline.conclusion != 'skipped' && github.event_name == 'repository_dispatch'
run: git pull --rebase --autostash
run: git pull --ff-only --no-tags --depth=1

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -161,8 +155,7 @@ jobs:
commit_user_email: rex-bot@users.noreply.github.com
file_pattern: .tools/psalm/baseline-taint.xml

phpstan-analysis:
name: phpstan static code analysis
phpstan:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event_name != 'repository_dispatch' || github.event.client_payload.slash_command.args.unnamed.all == '' || contains(github.event.client_payload.slash_command.args.unnamed.all, 'phpstan')
Expand All @@ -182,7 +175,7 @@ jobs:
${{ github.event.client_payload.github.payload.comment.body }}
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Checkout fork
- name: Checkout
uses: actions/checkout@v4
if: github.event_name != 'repository_dispatch'
- name: Checkout on chat commnad
Expand All @@ -202,8 +195,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist

- name: Setup REDAXO
run: |
Expand All @@ -226,7 +217,7 @@ jobs:
- name: Git pull
if: failure() && steps.baseline.conclusion != 'skipped' && github.event_name == 'repository_dispatch'
run: git pull --rebase --autostash
run: git pull --ff-only --no-tags --depth=1

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist ${{ matrix.composer-flags }}
composer-options: ${{ matrix.composer-flags }}

- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
1 change: 0 additions & 1 deletion .tools/phpstan/baseline.neon
Expand Up @@ -2094,4 +2094,3 @@ parameters:
message: "#^Method rex_var_test\\:\\:varCallback\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#"
count: 1
path: ../../redaxo/src/core/tests/var/var_test.php

0 comments on commit 4cf7cc3

Please sign in to comment.