Skip to content

Commit

Permalink
Add E2E workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aashwin-rvvup committed May 16, 2024
1 parent 8803eaf commit 14c20e4
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: E2E Tests Workflow
on:
pull_request:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
inputs:
rvvupHyvaCheckoutVersion:
description: 'Rvvup Hyva Checkout 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_HYVA_CHECKOUT_VERSION: ${{ github.event.inputs.rvvupHyvaCheckoutVersion || format('dev-{0}', 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
uses: emilioschepis/[email protected]
with:
url: http://local.dev.rvvuptech.com/magento_version
method: GET
expected-status: 200
timeout: 300000
interval: 5000

- name: Run Playwright tests
run: TEST_BASE_URL=http://local.dev.rvvuptech.com npx playwright test

- name: Prepare logs
if: always()
run: |
mkdir -p logs
docker-compose logs > logs/container_logs.log
docker cp magento-plugin-magento-1:/bitnami/magento/var/log logs
- uses: actions/upload-artifact@v4
if: always()
with:
name: results-${{ matrix.MAGENTO_VERSION }}-${{ github.run_number }}
path: |
playwright-report/
var/log/
magento.log
nginx-proxy.log

0 comments on commit 14c20e4

Please sign in to comment.