Merge pull request #37233 from jolelievre/merge-90x-241024 #499
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
env: | |
TEST_CAMPAIGN: 'sanity:fast-fail' | |
jobs: | |
sanity: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
runs-on: ubuntu-latest | |
name: Sanity | |
strategy: | |
matrix: | |
include: | |
## 8.1 | |
- php: 8.1 | |
browser: chromium | |
db: mysql | |
- php: 8.1 | |
browser: firefox | |
db: mysql | |
- php: 8.1 | |
browser: webkit | |
db: mysql | |
- php: 8.1 | |
browser: chromium | |
db: mariadb | |
## 8.2 | |
- php: 8.2 | |
browser: chromium | |
db: mysql | |
- php: 8.2 | |
browser: firefox | |
db: mysql | |
- php: 8.2 | |
browser: webkit | |
db: mysql | |
- php: 8.2 | |
browser: chromium | |
db: mariadb | |
## 8.3 | |
- php: 8.3 | |
browser: chromium | |
db: mysql | |
- php: 8.3 | |
browser: firefox | |
db: mysql | |
- php: 8.3 | |
browser: webkit | |
db: mysql | |
- php: 8.3 | |
browser: chromium | |
db: mariadb | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Environment | |
timeout-minutes: 15 | |
uses: ./.github/actions/setup-env | |
with: | |
PHP_VERSION: ${{ matrix.php }} | |
ENABLE_SSL: 'true' | |
INSTALL_AUTO: 'false' | |
DB_SERVER: ${{ matrix.db }} | |
- name: Setup Environment failure | |
uses: ./.github/actions/setup-env-export-logs | |
with: | |
DOCKER_PREFIX: prestashop | |
ARTIFACT_NAME: setup-sanity-${{ matrix.php }}-${{ matrix.browser }}-${{ matrix.db }} | |
DB_SERVER: ${{ matrix.db }} | |
ENABLE_SSL: 'true' | |
INSTALL_AUTO: 'false' | |
if: failure() | |
- name: Run Tests | |
uses: ./.github/actions/ui-test | |
env: | |
## Improve Webkit stability | |
## Link : https://github.com/microsoft/playwright/issues/23899 | |
GDK_BACKEND: x11 | |
with: | |
TEST_CAMPAIGN: ${{ env.TEST_CAMPAIGN }} | |
BROWSER: ${{ matrix.browser }} | |
DB_SERVER: ${{ matrix.db }} | |
- name: Export docker logs | |
if: failure() | |
run: | | |
mkdir -p ./var/docker-logs | |
docker logs prestashop-${{ matrix.db }}-1 > ./var/docker-logs/${{ matrix.db }}.log | |
docker logs prestashop-prestashop-git-1 > ./var/docker-logs/prestashop.log | |
- name: Upload Screenshots and logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: sanity-${{ matrix.php }}-${{ matrix.browser }} | |
path: | | |
./tests/UI/screenshots/ | |
./var/logs | |
./var/docker-logs |