-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.31 KB
/
continuous-testing.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
76
77
78
79
80
81
82
83
name: Robot Framework Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
name: E2E Tests 🤖🤖
steps:
- name: Checkout 🚀🚀
uses: actions/checkout@v4
- name: Setup Python 🔧🔧
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies ➕➕
run: pip install -r requirements.txt
- name: Initialize Browser Library (Playwright) 🔧🔧
run: rfbrowser init
- name: E2E Tests 🧪🧪
run: robot -d ./reports -v HEADLESS:true tests/
- name: Publish Robot Reports 📄📄
uses: actions/upload-artifact@v4
if: always()
with:
name: Robot-Reports
path: reports
retention-days: 90
if-no-files-found: warn
- name: Slack Notification - Success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: pipeline-notifications
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/1642/1642322.png
SLACK_TITLE: 'All tests passed successfully'
SLACK_MESSAGE: ':robot: Tests passed :robot:'
SLACK_USERNAME: SUCCESS
- name: Slack Notification - Failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: pipeline-notifications
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/3271/3271351.png
SLACK_TITLE: 'Some tests failed'
SLACK_MESSAGE: ':fire: Tests failed :fire:'
SLACK_USERNAME: FAILURE
reports:
if: always()
needs: [tests]
runs-on: ubuntu-latest
continue-on-error: true
name: Reports 📄📄
steps:
- uses: actions/checkout@v4
- name: Download Robot Reports
uses: actions/download-artifact@v4
with:
name: Robot-Reports
path: reports
- name: Send report to commit
uses: joonvena/robotframework-reporter-action@v2.4
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}