Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: CI

on: [push, pull_request]
on: [pull_request]

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
php: [8.2, 8.3, 8.4]

steps:
- name: Checkout code
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Automated release
on:
push:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [ 8.2, 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 }}
tools: phpcs, phpstan

- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install

- name: Code style
run: phpcs src/ tests/

- name: Static analysis
run: phpstan

- name: Run tests
run: ./vendor/bin/phpunit tests/
release:
name: Automated release
needs:
- tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
packages: write
contents: write
pull-requests: write
11 changes: 11 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"branches": ["master"],
"tagFormat": "${version}",
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits",
"presetConfig": {}
}],
"@semantic-release/github",
"@semantic-release/release-notes-generator"]
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
],
"homepage": "https://codeception.com/",
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-mbstring": "*",
"guzzlehttp/psr7": "^2.0",
"phpunit/phpunit": "^9.5 | ^10.0 | ^11.0 | ^12",
"phpunit/phpunit": "^11.5 | ^12",
"symfony/css-selector": ">=4.4.24 <8.0"
},
"require-dev": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
paths:
- ./src
- ./tests
level: 5