E2E workflow #2
Workflow file for this run
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: E2E Tests Workflow | |
on: | |
pull_request: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 8 * * *' | |
workflow_dispatch: | |
inputs: | |
rvvupPluginVersion: | |
description: 'Rvvup Plugin Version' | |
required: true | |
default: 'dev-main' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
end-2-end-tests: | |
strategy: | |
matrix: | |
include: | |
- MAGENTO_VERSION: 2.4.5 | |
- MAGENTO_VERSION: 2.4.6 | |
- MAGENTO_VERSION: 2.4.7 | |
env: | |
MAGENTO_VERSION: ${{ matrix.MAGENTO_VERSION }} | |
RVVUP_PLUGIN_VERSION: dev-${{ github.head_ref || github.ref_name }} | |
MAGENTO_REPO_PUBLIC_KEY: ${{ secrets.REPO_PUB_KEY }} | |
MAGENTO_REPO_PRIVATE_KEY: ${{ secrets.REPO_SEC_KEY }} | |
RVVUP_API_KEY: ${{ secrets.RVVUP_API_KEY }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Start Docker | |
run: | | |
docker compose up -d --build | |
- name: Install dependencies | |
run: npm install | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Wait for Magento Store | |
run: | | |
while true; do | |
http_status=$(curl -o /dev/null -s -w "%{http_code}\n" -I "http://localhost/magento_version") | |
if [ "$http_status" -eq 200 ]; then | |
break | |
else | |
sleep 2 | |
fi | |
done | |
- name: Run Playwright tests | |
run: TEST_BASE_URL=http://localhost npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report-${{ matrix.MAGENTO_VERSION }}-${{ github.run_number }} | |
path: | | |
playwright-report/ | |