Skip to content

Commit

Permalink
Added Slack notifications to the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
qaPaloma committed Feb 9, 2024
1 parent 41d556e commit 2b60b92
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,27 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: report-tests
path: '**/formated-report/'
path: '**/formated-report/'

- name: Send notification to Slack - Success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_USERNAME: qaBot
SLACK_MESSAGE: 'Successful execution of PR tests :white_check_mark:'
SLACK_TITLE: Smoke tests were executed
SLACK_ICON: https://www.flaticon.com/free-icon/robot_13513628?related_id=13513628.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Send notification to Slack - Fail
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_USERNAME: qaBot
SLACK_MESSAGE: 'PR test execution failed :fire:'
SLACK_ICON: https://www.flaticon.com/free-icon/sad_13513643?related_id=13513643.PNG
SLACK_TITLE: Smoke tests were executed

SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ target/
!**/src/main/**/target/
!**/src/test/**/target/

notes/slack notifications
notes/


### IntelliJ IDEA ###
.idea
.idea/modules.xml
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ On the terminal, type:
- [Setup Chrome](https://github.com/marketplace/actions/setup-chrome)
- [setup-chromedriver](https://github.com/marketplace/actions/setup-chromedriver)
- [Upload a Build Artifact](https://github.com/marketplace/actions/upload-a-build-artifact)
- [Slack Notify](https://github.com/marketplace/actions/slack-notify)

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<version>${maven.compiler.version}</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.source}</target>
<source>${java.version}</source>
<target>${java.version}</target>
<includes>
<include>src/test/java</include>
</includes>
Expand Down

0 comments on commit 2b60b92

Please sign in to comment.