-
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
Robbie
committed
Aug 31, 2022
0 parents
commit a824282
Showing
6 changed files
with
467 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,5 @@ | ||
/vendor | ||
/composer.lock | ||
.DS_Store | ||
.idea | ||
*.yml |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,72 @@ | ||
slack-codeception-extension | ||
============================= | ||
This package provides an extension for Codeception to send test results to Slack channels and/or users. | ||
|
||
Pre-requisites | ||
------------- | ||
|
||
- a pre-configured webhook from the Slack integration "Incoming Webhook" | ||
(see https://api.slack.com/incoming-webhooks for more information) | ||
|
||
Installation | ||
----------- | ||
|
||
Add the package `ngraf/slack-codeception-extension` to `composer.json` manually or type this in console: | ||
|
||
composer require ngraf/slack-codeception-extension | ||
|
||
Usage | ||
----- | ||
Enable and configure the extension in your `codeception.yaml` | ||
|
||
**Basic** usage: | ||
|
||
extensions: | ||
enabled: | ||
- Codeception\Extension\SlackExtension | ||
config: | ||
Codeception\Extension\SlackExtension: | ||
webhook: https://hooks.slack.com/services/... | ||
**Advanced** usage: | ||
|
||
extensions: | ||
enabled: | ||
- Codeception\Extension\SlackExtension | ||
config: | ||
Codeception\Extension\SlackExtension: | ||
webhook: https://hooks.slack.com/services/... | ||
# possible notification strategies: always|successonly|failonly|failandrecover|statuschange | ||
strategy: always | ||
# If 'true' details about failed tests will be displayed. Default value: 'false' | ||
extended: true | ||
# Limit the size of error messages in extended mode. 0 = unlimited. Default value: 80 | ||
extendedMaxLength: 80 | ||
# Limit the amount of reported errors in extended mode. 0 = unlimited. Default value: 0 | ||
extendedMaxErrors: 10 | ||
# customize your message with additional prefix and/or suffix | ||
messagePrefix: '*Smoke-Test*' | ||
messageSuffix: <http://my-ci/my-job|Link> | ||
messageSuffixOnFail: <!channel> | ||
# optional config keys that will overwrite the default configuration of the webhook | ||
channel: '#any-channel,@any-user' | ||
channelOnFail: '#any-channel,@any-user' | ||
username: CI | ||
icon: :ghost: | ||
Example | ||
----- | ||
|
||
![slack-example](slack-example.png) | ||
|
||
Dependencies | ||
----- | ||
This package uses the package [maknz/slack](https://github.com/maknz/slack) to communicate with the Slack API. |
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,25 @@ | ||
{ | ||
"name": "ngraf/slack-codeception-extension", | ||
"description": "This package provides an extension for Codeception to broadcast test results in Slack messenger ", | ||
"keywords": [ | ||
"codeception", | ||
"slack", | ||
"extension" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Norbert Graf", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/ngraf", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Codeception\\": "src" | ||
} | ||
}, | ||
"require": { | ||
"alek13/slack": "^2.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.