forked from PrestaShop/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.64 KB
/
sanity.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
name: UI tests
on: [ push, pull_request ]
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
sanity:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
name: Sanity
strategy:
matrix:
php: [ '8.1', '8.2' ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Setup environment
uses: ./.github/actions/setup-prestashop-env
with:
php-version: ${{ matrix.php }}
mysql-version: '5.7'
mysql-database: 'prestashop'
mysql-root-password: 'password'
node-version: '16'
npm-version: '7'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Playwright browsers
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright/
key: ${{ runner.os }}-browsers
- name: Use .env.ci
run: mv .env.ci .env
working-directory: ./tests/UI
- name: Install dependencies
working-directory: ./tests/UI
run: npm ci
- name: Install browsers
working-directory: ./tests/UI
run: npx playwright install --with-deps
- name: Run tests
run: npm run test:sanity:fast-fail
working-directory: ./tests/UI
env:
ENABLE_SSL: true
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshots-${{ matrix.php }}
path: ./tests/UI/screenshots/