-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Check PR Title | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- ready_for_review | ||
- reopened | ||
|
||
jobs: | ||
check-pr-title: | ||
name: Check PR title | ||
timeout-minutes: 10 | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: blumilksoftware/action-pr-title@e05fc76a1cc45b33644f1de51218be43ac121dd0 # v1.2.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Test & lint PHP stuff | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
paths: | ||
- '**.php' | ||
- 'composer.json' | ||
- 'composer.lock' | ||
- 'phpunit.xml' | ||
|
||
jobs: | ||
test-and-lint-php: | ||
name: Test & lint PHP stuff | ||
timeout-minutes: 10 | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer-dependencies | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # 2.30.4 | ||
with: | ||
php-version: 8.2 | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, intl, gd | ||
coverage: none | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --no-interaction --no-suggest | ||
|
||
- name: Run PHP linter | ||
run: composer cs | ||
|
||
- name: Execute tests | ||
run: php vendor/bin/phpunit --configuration phpunit.xml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.composer | ||
vendor | ||
composer.lock | ||
index.php | ||
.phpunit.result.cache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/|version|/phpunit.xsd" | ||
bootstrap="vendor/autoload.php"> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |