chore: Configure Renovate #27
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 ] | |
jobs: | |
sanity: | |
runs-on: ubuntu-latest | |
name: Sanity | |
strategy: | |
matrix: | |
php: [ '7.2', '7.3', '7.4', '8.0' ] | |
fail-fast: false | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv, simplexml, pdo, mysql | |
- name: Setup Apache | |
run: sudo bash .github/workflows/sanity/setup-apache.sh ${{ github.workspace }} ${{ matrix.php }} | |
- name: Setup MySQL | |
uses: mirromutth/[email protected] | |
with: | |
mysql version: '5.7' | |
mysql database: 'prestashop' | |
mysql root password: 'password' | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: PrestaShop Configuration | |
run: cp .github/workflows/phpunit/parameters.yml app/config/parameters.yml | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache node Directory | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('admin-dev/**/package-lock.json', 'tests/**/package-lock.json', 'themes/**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Cache Composer Directory | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Composer install and build assets | |
run: make | |
- run: | | |
sudo chown www-data:www-data -R ${{ github.workspace }} && \ | |
sudo mkdir -p /var/lib/php/sessions && \ | |
sudo chown www-data:www-data -R /var/lib/php/sessions && \ | |
sudo service apache2 restart | |
- name: Cache Playwright browsers | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/ms-playwright/ | |
key: ${{ runner.os }}-browsers | |
- name: Run tests | |
run: npm install && npm run test:sanity:fast-fail | |
env: | |
URL_FO: http://localhost/ | |
DB_NAME: prestashop | |
DB_PASSWD: password | |
HEADLESS: true | |
TAKE_SCREENSHOT_AFTER_FAIL: true | |
working-directory: ./tests/UI | |
- uses: actions/upload-artifact@v2 | |
if: ${{ always() }} | |
with: | |
name: screenshots-${{ matrix.php }} | |
path: ./tests/UI/screenshots/ |