-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into fix
# Conflicts: # cleantalk.php
- Loading branch information
Showing
6 changed files
with
88 additions
and
64 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
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,66 @@ | ||
name: Auto-Tests (PHPUnit, PHPCS, Psalm) running. | ||
|
||
on: # event list | ||
push: # on push to each of these branches | ||
branches: | ||
- dev | ||
- fix | ||
- master | ||
pull_request: | ||
branches: | ||
- dev | ||
- master | ||
|
||
env: # environment variables (available in any part of the action) | ||
PHP_VERSION: 7.4 | ||
|
||
jobs: | ||
build: | ||
name: PHPUnit, PHPCS, Psalm | ||
runs-on: ubuntu-latest | ||
env: | ||
DB_CONNECTION: mysql | ||
DB_HOST: localhost | ||
DB_PORT: 3306 | ||
DB_DATABASE: wordpress_test | ||
DB_USERNAME: root | ||
DB_PASSWORD: root | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
|
||
- name: Run MySQL server | ||
run: sudo systemctl start mysql | ||
|
||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Make the script files executable | ||
run: chmod +x ./tests/wp-test-setup.sh | ||
|
||
- name: Install WP develop | ||
run: ./tests/wp-test-setup.sh wordpress_test root root localhost latest | ||
|
||
- name: Install Dependencies | ||
run: composer i | ||
|
||
- name: Running tests | ||
env: | ||
CLEANTALK_TEST_API_KEY: ${{ secrets.CLEANTALK_TEST_API_KEY }} | ||
run: composer test | ||
|
||
- name: Telegram notify | ||
if: failure() | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_PLUGINS_TO }} | ||
token: ${{ secrets.TELEGRAM_REVIEWER_TOKEN }} | ||
message: | | ||
Hi, <strong>${{ github.actor }}</strong>! Your commit for <strong>${{ github.repository }}</strong> | ||
contains 💯 the best solution but it have to be fixed! | ||
<a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">Auto-Tests (PHPUnit, PHPCS, Psalm)</a> build failed ⛔! | ||
format: html | ||
disable_web_page_preview: true |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"require-dev": { | ||
"vimeo/psalm": "^4.8", | ||
"phpunit/phpunit": "^7.5", | ||
"squizlabs/php_codesniffer": "3.*", | ||
|
@@ -30,5 +30,10 @@ | |
"just_phpunit": [ | ||
"vendor/bin/phpunit --configuration tests/phpunit.xml --debug" | ||
] | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
} | ||
} |
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
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