diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index b161284d..7a9374bc 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -36,10 +36,6 @@ jobs: name: 'Tests' run: vendor/bin/phpunit - - - name: 'Run StructArmed' - run: vendor/bin/structarmed analyze - name: ${{ matrix.actions.name }} runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.github/workflows/dispatch_build_scoped_rector.yaml b/.github/workflows/dispatch_build_scoped_rector.yaml index 2abe4ba4..8ca35aa7 100644 --- a/.github/workflows/dispatch_build_scoped_rector.yaml +++ b/.github/workflows/dispatch_build_scoped_rector.yaml @@ -15,8 +15,29 @@ jobs: runs-on: ubuntu-latest steps: + # a tagged main is already being published by the tag build of rector-src, + # dispatching a second build would race it for the push to rectorphp/rector + - + name: "Check whether rector-src main is a release tag commit" + id: release_tag + run: | + RECTOR_SRC="https://github.com/rectorphp/rector-src.git" + + MAIN_SHA=$(git ls-remote $RECTOR_SRC refs/heads/main | cut -f1) + if [ -z "$MAIN_SHA" ]; then + echo "Could not resolve rector-src main" + exit 1 + fi + + # lightweight tags are listed with the commit itself, annotated ones with a "^{}" line + if git ls-remote --tags $RECTOR_SRC | grep -q "^${MAIN_SHA}"; then + echo "rector-src main $MAIN_SHA is tagged, leaving the build to the tag itself" + echo "tagged=true" >> $GITHUB_OUTPUT + fi + - name: "Trigger build_scoped_rector.yaml in rectorphp/rector-src" + if: steps.release_tag.outputs.tagged != 'true' env: GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} run: gh workflow run build_scoped_rector.yaml --repo rectorphp/rector-src --ref main diff --git a/composer.json b/composer.json index f3c1b459..62d04d2c 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,6 @@ "php": ">=8.4" }, "require-dev": { - "boundwize/structarmed": "^0.14", "phpstan/extension-installer": "^1.4", "phpstan/phpstan": "^2.1.38", "phpstan/phpstan-deprecation-rules": "^2.0", diff --git a/structarmed.php b/structarmed.php deleted file mode 100644 index 2cd501fd..00000000 --- a/structarmed.php +++ /dev/null @@ -1,9 +0,0 @@ -withPreset(Preset::PSR4());