-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
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 }} | ||
HYVA_SSH_PRIVATE_KEY: ${{ secrets.HYVA_SSH_PRIVATE_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: mydea/[email protected] | ||
with: | ||
url: http://local.dev.rvvuptech.com:89/magento_version | ||
method: GET | ||
expected-status: "200" | ||
timeout: "500" | ||
interval: "5" | ||
|
||
- name: Run Playwright tests | ||
run: TEST_BASE_URL=http://local.dev.rvvuptech.com:89 npx playwright test | ||
|
||
- name: Prepare logs | ||
if: always() | ||
run: | | ||
mkdir -p logs | ||
docker-compose logs > logs/container_logs.log | ||
docker cp magento-hyva-checkout-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 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,10 @@ services: | |
- 'rvvup_hyva_data_mariadb:/bitnami/mariadb' | ||
magento: | ||
ports: | ||
- '80:8080' | ||
- '443:8443' | ||
- '89:8080' | ||
- '8443:8443' | ||
environment: | ||
- BITNAMI_DEBUG=true | ||
- MAGENTO_HOST=localhost | ||
- MAGENTO_DATABASE_HOST=mariadb | ||
- MAGENTO_DATABASE_PORT_NUMBER=3306 | ||
- MAGENTO_DATABASE_USER=bn_magento | ||
|
@@ -23,7 +22,7 @@ services: | |
- ELASTICSEARCH_PORT_NUMBER=9200 | ||
# ALLOW_EMPTY_PASSWORD is recommended only for development. | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
- MAGENTO_HOST=local.dev.rvvuptech.com | ||
- MAGENTO_HOST=local.dev.rvvuptech.com:89 | ||
- MAGENTO_USERNAME=admin | ||
- MAGENTO_PASSWORD=password1 | ||
- [email protected] | ||
|
@@ -32,6 +31,8 @@ services: | |
- MAGENTO_REPO_PUBLIC_KEY=$MAGENTO_REPO_PUBLIC_KEY | ||
- MAGENTO_REPO_PRIVATE_KEY=$MAGENTO_REPO_PRIVATE_KEY | ||
- HYVA_SSH_PRIVATE_KEY=$HYVA_SSH_PRIVATE_KEY | ||
- MAGENTO_SMTP_HOST=mailpit | ||
- MAGENTO_SMTP_PORT=1025 | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|
@@ -44,6 +45,10 @@ services: | |
image: docker.io/bitnami/elasticsearch:7 | ||
volumes: | ||
- 'rvvup_hyva_elasticsearch_data:/bitnami/elasticsearch/data' | ||
mailpit: | ||
image: docker.io/axllent/mailpit:v1.18 | ||
ports: | ||
- '9925:8025' | ||
volumes: | ||
rvvup_hyva_data_mariadb: | ||
driver: local | ||
|
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
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