-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.35 KB
/
scheduled_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Scheduled Regression Test - PR
on:
schedule:
- cron: '15 2,11 * * MON-FRI'
jobs:
RunTest:
runs-on: ubuntu-latest
steps:
- name: Starting scheduled regression tests
uses: rtCamp/action-slack-notify@v2
env:
SLACK_USERNAME: qaBot
SLACK_MESSAGE: 'Starting scheduled regression test :beetle:'
SLACK_TITLE: Attention
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/13513/13513665.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- name: Clone project
uses: actions/checkout@v4
- name: Install Java 20
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '20.0.2'
cache: 'maven'
- name: Install Chrome
uses: browser-actions/setup-chrome@latest
- name: Install Chrome Driver
uses: actions/checkout@v2
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Run tests
run: mvn test -Dtest=RunCucumberTest -Dbrowser=chrome-headless -Dcucumber.filter.tags="~@ignore"
- name: Generate reports
if: always()
run: mvn cluecumber-report:reporting
- name: File report artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: report-tests
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 test execution :white_check_mark:'
SLACK_TITLE: Scheduled tests were executed
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/13513/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: 'Test execution failed :fire:'
SLACK_TITLE: Scheduled tests were executed
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/13513/13513643.png
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}