-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 2.17 KB
/
allTests.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
# https://github.com/marketplace/actions/cypress-io
name: Run All Tests Headless
on:
workflow_dispatch:
inputs:
ru:
description: The variable to be passed
required: false
default: TEST
schedule:
- cron: 0 7 * * 1
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] # Uses 2 parallel instances
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.14.2
- name: Update & Install Ubuntu packages
run: |
env
sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Update & Install NPM packages
run: |
npx browserslist@latest --update-db
npm ci
- name: Clear Report
run: |
echo "Clear the report"
npm run delete-mochawesome-report
npm run delete-results
- name: Run Tests
uses: cypress-io/github-action@v6
with:
browser: chrome
spec: 'cypress/e2e/**/*' # Run all tests. Same as empty string ''
env:
CYPRESS_RU: ${{ github.event.inputs.ru }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
# CYPRESS_BASE_URL: '' # Fil in new baseUrl with https prefix
- name: Prepare report
if: success() || failure()
run: |
mkdir -p cypress/results/
cp -r cypress/reports/html/* cypress/results/
- name: Archive results
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
cypress/results/**