Skip to content

Cypress

Cypress #44

Workflow file for this run

name: Cypress
on:
workflow_dispatch: ~
schedule:
- cron: 0 13 * * 1-5
permissions: read-all
jobs:
cypress:
name: Contao ${{ matrix.contao }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contao: [5.3, 5.x]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3 # highest version supported by all Contao versions in the matrix
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
coverage: none
- name: Initialize the database
run: |
sudo /etc/init.d/mysql start
mysql -uroot -proot -e "CREATE database contao_test"
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: corepack enable
- name: Install Symfony CLI
run: |
wget https://get.symfony.com/cli/installer -O - | bash
mv /home/runner/.symfony5/bin/symfony /usr/local/bin/symfony
symfony server:ca:install
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.contao }}
show-progress: false
- name: Install the dependencies
run: yarn add contao-e2e-tests --dev
- name: Run the Cypress tests
id: cypress
run: yarn contao-e2e-tests
env:
DATABASE_URL: mysql://root:[email protected]:3306/contao_test
- name: Upload videos
uses: actions/upload-artifact@v2
if: ${{ failure() && steps.cypress.conclusion == 'failure' }}
with:
name: Cypress videos
path: cypress/videos
retention-days: 14