diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..95c1c3e --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'weekly' + groups: + github-actions: + patterns: + - '*' + cooldown: + default-days: 7 diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index b48edfb..bba1c5a 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -6,6 +6,13 @@ on: push: branches: ['1.x'] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: easy-coding-standard: name: Easy Coding Standard (PHP ${{ matrix.php-version }}) @@ -14,22 +21,22 @@ jobs: strategy: matrix: php-version: - - '8.4' + - '8.5' steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 with: coverage: none php-version: ${{ matrix.php-version }} - tools: cs2pr - extensions: zip - name: Install Composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run Easy Coding Standard - run: 'vendor/bin/ecs --output-format=checkstyle | cs2pr' + run: vendor/bin/ecs diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 325c608..97a28f4 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -6,10 +6,18 @@ on: push: branches: ['1.x'] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: phpunit: name: PHPUnit (PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }}) runs-on: ubuntu-24.04 + continue-on-error: ${{ matrix.continue-on-error || false }} env: SYMFONY_REQUIRE: ${{ matrix.symfony-version }} @@ -22,26 +30,28 @@ jobs: - '8.5' symfony-version: - '6.4.*' - - '7.3.*' - - '7.4.*@dev' + - '7.4.*' include: - php-version: '8.4' - symfony-version: '8.0.*@dev' + symfony-version: '8.0.*' + - php-version: '8.5' + symfony-version: '8.0.*' - php-version: '8.5' - symfony-version: '8.0.*@dev' + symfony-version: '8.1.*@dev' + continue-on-error: true steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: + persist-credentials: false fetch-depth: 2 - name: Install PHP with pcov - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 with: coverage: pcov php-version: ${{ matrix.php-version }} - extensions: zip tools: flex - name: Configure Composer minimum-stability for dev versions @@ -49,11 +59,11 @@ jobs: run: composer config minimum-stability dev - name: Install Composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run PHPUnit run: vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload to Codecov - uses: codecov/codecov-action@v5 - if: matrix.php-version == '8.4' && matrix.symfony-version == '6.4.*' + uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + if: matrix.php-version == '8.4' && matrix.symfony-version == '7.4.*' diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index cac5330..c0d116f 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -6,6 +6,13 @@ on: push: branches: ['1.x'] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: phpstan: name: PHPStan (PHP ${{ matrix.php-version }}) @@ -14,22 +21,22 @@ jobs: strategy: matrix: php-version: - - '8.4' + - '8.5' steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1 with: coverage: none php-version: ${{ matrix.php-version }} - tools: cs2pr - extensions: zip - name: Install Composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run PHPStan - run: 'vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr' + run: vendor/bin/phpstan analyse diff --git a/.github/workflows/zizmor.yaml b/.github/workflows/zizmor.yaml new file mode 100644 index 0000000..df7db05 --- /dev/null +++ b/.github/workflows/zizmor.yaml @@ -0,0 +1,35 @@ +name: GitHub Actions Security Analysis with zizmor 🌈 + +on: + pull_request: + branches: ["*.x"] + paths: + - '.github/**.yaml' + push: + branches: ["*.x"] + paths: + - '.github/**.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + zizmor: + name: Run zizmor 🌈 + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor 🌈 + uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 + with: + advanced-security: false + annotations: true + persona: 'pedantic'