-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·90 lines (80 loc) · 3.86 KB
/
PS1764_Cypress_Browserstack.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
84
85
86
87
88
89
90
name: PS1764 + E2E Cypress + Crossbrowser Browserstack Testing
on:
pull_request:
types: [opened, reopened]
branches: [master, v*.*.*]
jobs:
Cypress-E2E-Browserstack-1764:
runs-on: ubuntu-latest
env:
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
steps:
- name: Checkouting
uses: actions/[email protected]
- run: wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
shell: bash
- run: unzip -qq -o ngrok-stable-linux-amd64.zip
shell: bash
- run: ./ngrok authtoken ${{ secrets.NGROK_TOKEN }}
shell: bash
- run: ./ngrok http -region=eu -subdomain=sp1764 8002 > ngrok.log &
shell: bash
- name: Installing composer
run: composer i
- name: Installing NPM, NPX packages
run: npm ci & npx browserslist@latest --update-db
- name: PS1764 installing / Module Install and Uninstall testing...
run: |
make e2eh1764
- name: Testing with E2E Cypress on PS1786
uses: cypress-io/[email protected]
with:
spec: |
cypress/integration/01_ps1764.Module.Configure.cy.js
env:
CYPRESS_SAFERPAY_EMAIL: ${{ secrets.SAFERPAY_EMAIL }}
CYPRESS_SAFERPAY_PASSWORD: ${{ secrets.SAFERPAY_PASSWORD }}
CYPRESS_SAFERPAY_USERNAME_TEST: ${{ secrets.PS1764_SAFERPAY_USERNAME_TEST }}
CYPRESS_SAFERPAY_PASSWORD_TEST: ${{ secrets.PS1764_SAFERPAY_PASSWORD_TEST }}
CYPRESS_SAFERPAY_CUSTOMER_ID_TEST: ${{ secrets.PS1764_SAFERPAY_CUSTOMER_ID_TEST }}
CYPRESS_SAFERPAY_TERMINAL_ID_TEST: ${{ secrets.PS1764_SAFERPAY_TERMINAL_ID_TEST }}
CYPRESS_SAFERPAY_MERCHANT_EMAILS_TEST: ${{ secrets.SAFERPAY_MERCHANT_EMAILS_TEST }}
CYPRESS_SAFERPAY_FIELDS_ACCESS_TOKEN_TEST: ${{ secrets.PS1764_SAFERPAY_FIELDS_ACCESS_TOKEN_TEST }}
- name: Archive videos and screenshots of Cypress testing
if: ${{ always() }}
uses: actions/[email protected]
with:
name: videos_screenshots
retention-days: 2
path: |
cypress/videos
cypress/screenshots
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: 'Initializing Browserstack'
run: npm install -g browserstack-cypress-cli
- name: 'NPM updating'
run: npm update --force
- name: 'Starting Browserstack Testing'
run: |
export CYPRESS_SAFERPAY_EMAIL='${{ secrets.SAFERPAY_EMAIL }}'
export CYPRESS_SAFERPAY_PASSWORD='${{ secrets.SAFERPAY_PASSWORD }}'
export CYPRESS_SAFERPAY_USERNAME_TEST='${{ secrets.PS1764_SAFERPAY_USERNAME_TEST }}'
export CYPRESS_SAFERPAY_PASSWORD_TEST='${{ secrets.PS1764_SAFERPAY_PASSWORD_TEST }}'
export CYPRESS_SAFERPAY_CUSTOMER_ID_TEST='${{ secrets.PS1764_SAFERPAY_CUSTOMER_ID_TEST }}'
export CYPRESS_SAFERPAY_TERMINAL_ID_TEST='${{ secrets.PS1764_SAFERPAY_TERMINAL_ID_TEST }}'
export CYPRESS_SAFERPAY_MERCHANT_EMAILS_TEST='${{ secrets.SAFERPAY_MERCHANT_EMAILS_TEST }}'
export CYPRESS_SAFERPAY_FIELDS_ACCESS_TOKEN_TEST='${{ secrets.PS1764_SAFERPAY_FIELDS_ACCESS_TOKEN_TEST }}'
browserstack-cypress run --sync -s '**/cypress/integration/02_ps1764.cy.js'
- name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop