-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathend-to-end-tests-all-devices.yaml
More file actions
106 lines (95 loc) · 3.17 KB
/
end-to-end-tests-all-devices.yaml
File metadata and controls
106 lines (95 loc) · 3.17 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: End-to-End tests (all devices on QA)
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
test:
permissions:
contents: write
id-token: write
name: ${{ matrix.device }}
strategy:
fail-fast: false
matrix:
include:
# Linux devices
- device: Desktop Chrome
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Desktop Edge
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Desktop Firefox
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Galaxy S9+
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Pixel 7
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
# macOS devices
- device: Desktop Safari
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
- device: iPad (gen 7) landscape
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
- device: iPhone 15
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
max-parallel: 5
runs-on: ${{ matrix.os }}
env:
TZ: "Europe/London"
steps:
- uses: actions/checkout@v6
- name: Deployment health check
uses: ./.github/actions/deployment-health-check
with:
environment_url: ${{ vars.BASE_URL }}
- name: Set cache path
id: cache-path
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
echo "path=$HOME/Library/Caches/ms-playwright" >> "$GITHUB_OUTPUT"
else
echo "path=$HOME/.cache/ms-playwright" >> "$GITHUB_OUTPUT"
fi
- name: Cache Playwright browsers
uses: actions/cache@v5
id: playwright-cache
with:
path: ${{ steps.cache-path.outputs.path }}
key: playwright-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
- name: Run tests
uses: ./.github/actions/run-end-to-end-tests
with:
device: ${{ matrix.device }}
base_url: ${{ vars.BASE_URL }}
imms_api_tests: "false"
pds_api_tests: "false"
reporting_tests: "false"
playwright_cache_hit: ${{ steps.playwright-cache.outputs.cache-hit }}
screenshot_all_steps: "false"
env:
BASIC_AUTH_TOKEN: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }}
IMMS_BASE_URL: ${{ vars.IMMS_BASE_URL }}
IMMS_API_KEY: ${{ secrets.IMMS_API_KEY }}
IMMS_API_KID: ${{ secrets.IMMS_API_KID }}
IMMS_API_PEM: ${{ secrets.IMMS_API_PEM }}
- name: Configure AWS credentials
if: always()
uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::393416225559:role/GitHubAssuranceTestRole
- name: Process reports
if: always()
uses: ./.github/actions/deploy-reports
with:
device: ${{ matrix.device }}
environment: qa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}