Skip to content

Commit

Permalink
Merge pull request #35 from elgentos/gitlab-70
Browse files Browse the repository at this point in the history
Gitlab 70
  • Loading branch information
dheesen authored Dec 31, 2024
2 parents 214f2e4 + 88d3c76 commit 7ad8c22
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Magento 2 BDD E2E Testing Suite Self Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

env:
BASE_URL: https://hyva-demo.elgentos.io/
PRODUCTION_URL: https://hyva-demo.elgentos.io/
STAGING_URL: https://hyva-demo.elgentos.io/

MAGENTO_ADMIN_SLUG: ${{ secrets.MAGENTO_ADMIN_SLUG }}
MAGENTO_ADMIN_USERNAME: ${{ secrets.MAGENTO_ADMIN_USERNAME }}
MAGENTO_ADMIN_PASSWORD: ${{ secrets.MAGENTO_ADMIN_PASSWORD }}

MAGENTO_NEW_ACCOUNT_PASSWORD: ${{ secrets.MAGENTO_NEW_ACCOUNT_PASSWORD }}
MAGENTO_EXISTING_ACCOUNT_EMAIL_CHROMIUM: ${{ secrets.MAGENTO_EXISTING_ACCOUNT_EMAIL_CHROMIUM }}
MAGENTO_EXISTING_ACCOUNT_EMAIL_FIREFOX: ${{ secrets.MAGENTO_EXISTING_ACCOUNT_EMAIL_FIREFOX }}
MAGENTO_EXISTING_ACCOUNT_EMAIL_WEBKIT: ${{ secrets.MAGENTO_EXISTING_ACCOUNT_EMAIL_WEBKIT }}
MAGENTO_EXISTING_ACCOUNT_PASSWORD: ${{ secrets.MAGENTO_EXISTING_ACCOUNT_PASSWORD }}
MAGENTO_EXISTING_ACCOUNT_CHANGED_PASSWORD: ${{ secrets.MAGENTO_EXISTING_ACCOUNT_CHANGED_PASSWORD }}

MAGENTO_COUPON_CODE_CHROMIUM: ${{ secrets.MAGENTO_COUPON_CODE_CHROMIUM }}
MAGENTO_COUPON_CODE_FIREFOX: ${{ secrets.MAGENTO_COUPON_CODE_FIREFOX }}
MAGENTO_COUPON_CODE_WEBKIT: ${{ secrets.MAGENTO_COUPON_CODE_WEBKIT }}

CAPTCHA_BYPASS: true

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm install

- name: Install Playwright browsers
run: npx playwright install

- name: Install Playwright dependencies
run: npx playwright install-deps


- name: Copy config files
run: |
cp playwright.config.example.ts playwright.config.ts
cp bypass-captcha.config.example.ts bypass-captcha.config.ts
- name: Run Playwright setup test
run: npx playwright test --reporter=line --workers=4 tests/base/setup.spec.ts
env:
CI: true

- name: Run Playwright tests
run: npx playwright test --reporter=line --workers=4 --exclude=tests/base/setup.spec.ts
env:
CI: true
5 changes: 5 additions & 0 deletions tests/base/setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ if (!process.env.SETUP_COMPLETE) {
accountPassword
);

if (process.env.CI === 'true') {
console.log("Running in CI environment. Skipping .env update.");
process.exit(0);
}

const envPath = path.resolve(__dirname, '../../.env');
try {
if (fs.existsSync(envPath)) {
Expand Down

0 comments on commit 7ad8c22

Please sign in to comment.