-
Notifications
You must be signed in to change notification settings - Fork 19
88 lines (75 loc) · 2.39 KB
/
Copy pathui-tests.yml
File metadata and controls
88 lines (75 loc) · 2.39 KB
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
name: ui-tests
on:
workflow_run:
workflows: ["Notify ui test"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: bansan85/action-workflow_run-status@main
- name: checkout
uses: actions/checkout@v2
with:
# checkouts the commit that triggered the Notify ui test workflow
ref: ${{ github.event.workflow_run.head_sha }}
- name: cached dependencies
uses: actions/cache@v3
id: cached-dependencies
with:
path: |
./vendor
./tawkto/vendor
# the key will change if composer.lock changes
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('**/composer.lock') }}
- name: install dependencies
if: steps.cached-dependencies.outputs.cache-hit != 'true'
uses: php-actions/composer@v6
with:
php_extensions: zip
command: run build
tests:
needs: [build]
strategy:
fail-fast: false
matrix:
browser: ['chrome', 'firefox', 'edge']
runs-on: ubuntu-latest
env:
WEB_HOST: wordpress
SELENIUM_BROWSER: ${{ matrix.browser }}
SELENIUM_HOST: localhost
SELENIUM_PORT: 4444
steps:
- name: Report to PR
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
uses: bansan85/action-workflow_run-status@main
- name: checkout
uses: actions/checkout@v2
with:
# checkouts the commit that triggered the Notify ui test workflow
ref: ${{ github.event.workflow_run.head_sha }}
- name: Start docker services and setup WordPress
run: |
docker compose -f ./tests/docker/docker-compose.yml up -d;
docker attach wordpress-cli;
- name: cached dependencies
uses: actions/cache@v3
id: cached-dependencies
with:
path: |
./vendor
./tawkto/vendor
# the key will change if composer.lock changes
key: ${{ runner.os }}-composer-dependencies-${{ hashFiles('**/composer.lock') }}
- name: prepare test artifact
run: composer run package
- name: run tests
env:
TAWK_PROPERTY_ID: 61efb9abb9e4e21181bbc347
TAWK_WIDGET_ID: 1fq86qic0
TAWK_USERNAME: ${{ secrets.TAWK_USERNAME }}
TAWK_PASSWORD: ${{ secrets.TAWK_PASSWORD }}
run: composer run test