Merge pull request #123 from Codeception/php-cs-fixer-per2 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
static_analysis: | |
name: Static Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
- uses: ramsey/composer-install@v3 | |
- name: Initialize cache | |
uses: actions/cache@v4 | |
with: | |
key: phpstan | |
path: .phpstan-cache | |
- name: Run PHPStan | |
run: vendor/bin/phpstan | |
- name: Run ECS | |
run: php vendor/bin/ecs | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.3, 8.4] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: pdo, sqlite, imagick | |
coverage: none | |
- uses: ramsey/composer-install@v3 | |
- name: Run test suite | |
run: | | |
php vendor/bin/codecept build | |
php vendor/bin/codecept run | |
release: | |
name: Automated release | |
needs: | |
- static_analysis | |
- tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- run: > | |
npx | |
-p "@semantic-release/commit-analyzer" | |
-p "@semantic-release/release-notes-generator" | |
-p conventional-changelog-conventionalcommits | |
-p semantic-release | |
-- semantic-release --dry-run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
packages: write | |
contents: write | |
pull-requests: write |