From 3bab09feb72e1cfa71f2140be1dcaf999d91e55f Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 14 May 2024 14:43:27 +0100 Subject: [PATCH] ci: update GitHub Actions dependencies --- .editorconfig | 15 +++++++++++++++ .github/dependabot.yml | 10 ++++++++-- .github/workflows/code-analysis.yml | 16 ++++++++-------- .github/workflows/dependabot-auto-merge.yml | 18 +++++++++--------- .github/workflows/draft-release.yml | 8 +++++--- .github/workflows/main.yml | 4 ++-- .github/workflows/release.yml | 5 +++-- VERSION | 2 +- composer.json | 6 +++--- rector.php | 1 - src/Inspections/Inspection.php | 2 +- 11 files changed, 55 insertions(+), 32 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a7c44dd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3cb4145..da7ff72 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,13 @@ version: 2 updates: - # Enable version updates for composer - package-ecosystem: "composer" directory: "/" schedule: - interval: "daily" \ No newline at end of file + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml index c1b68b7..42c02a3 100644 --- a/.github/workflows/code-analysis.yml +++ b/.github/workflows/code-analysis.yml @@ -6,12 +6,12 @@ on: jobs: code_analysis_composer: timeout-minutes: 30 - name: ${{ matrix.actions.name }} on PHP ${{ matrix.php }} + name: '${{ matrix.actions.name }} on PHP ${{ matrix.php }}' runs-on: ubuntu-latest strategy: - fail-fast : false + fail-fast: false matrix: - php: ['8.2'] + php: [ '8.2', '8.3' ] actions: - name: ECS @@ -27,21 +27,21 @@ jobs: run: "composer validate" env: - APP_NAME : "Worksome CI" - APP_ENV : testing + APP_NAME: "Worksome CI" + APP_ENV: testing steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: coverage: none php-version: ${{ matrix.php }} - tools: composer, cs2pr + tools: cs2pr - name: Install Composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 - run: ${{ matrix.actions.run }} diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 3c7ff41..372212b 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -10,23 +10,23 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} steps: - + - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - + - name: Auto-merge Dependabot PRs for semver-minor updates - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} + if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' }} run: gh pr merge --auto --merge "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Auto-merge Dependabot PRs for semver-patch updates - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} + if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} run: gh pr merge --auto --merge "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 1be6827..f923524 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -12,7 +12,7 @@ jobs: steps: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Fetch version id: version @@ -41,12 +41,14 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 - name: Download Box Phar run: wget https://github.com/box-project/box/releases/latest/download/box.phar && chmod 755 box.phar - name: Install Composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: composer-options: "--no-dev" @@ -56,4 +58,4 @@ jobs: - name: Upload phar env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload ${{ steps.version.outputs.version }} build/graphlint || true \ No newline at end of file + run: gh release upload ${{ steps.version.outputs.version }} build/graphlint || true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 391a440..5ecb86f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: fail-fast: true matrix: os: [ ubuntu-latest ] - php: [ 8.2 ] + php: [ '8.2', '8.3' ] laravel: [ 10.* ] stability: [ prefer-lowest, prefer-stable ] @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfca722..ba09420 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,13 @@ jobs: steps: - name: Generate App Token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 id: generate_token with: private_key: ${{ secrets.WORKSOME_INTERNAL_PRIVATE_KEY }} app_id: ${{ secrets.WORKSOME_INTERNAL_APP_ID }} - repository: worksome/homebrew-tap + installation_retrieval_mode: repository + installation_retrieval_payload: worksome/homebrew-tap - name: Get version id: version diff --git a/VERSION b/VERSION index bf057db..4b8f7b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.10.0 +v0.11.2 diff --git a/composer.json b/composer.json index 3c962c5..592c317 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "jawira/case-converter": "^3.5" }, "require-dev": { - "pestphp/pest": "^2.0", - "symfony/var-dumper": "^6.0", + "pestphp/pest": "^2.34", + "symfony/var-dumper": "^6.4", "symplify/easy-testing": "^11.0", - "worksome/coding-style": "^2.5" + "worksome/coding-style": "^2.10.2" }, "license": "MIT", "autoload": { diff --git a/rector.php b/rector.php index c6480c8..c83f8c0 100644 --- a/rector.php +++ b/rector.php @@ -23,7 +23,6 @@ SetList::PHP_80, SetList::PHP_74, SetList::EARLY_RETURN, - SetList::PSR_4, ]); // Register extra a single rules diff --git a/src/Inspections/Inspection.php b/src/Inspections/Inspection.php index 20d1a4f..f79c986 100644 --- a/src/Inspections/Inspection.php +++ b/src/Inspections/Inspection.php @@ -99,7 +99,7 @@ public function visitEnumValueDefinition( ): void { } - public function __toString() + public function __toString(): string { return class_basename($this); }