Skip to content

Commit

Permalink
Functional Tests : Cash on delivery (COD) module: Upgrade module
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Oct 11, 2024
1 parent 6bf8dfc commit a820fce
Show file tree
Hide file tree
Showing 8 changed files with 481 additions and 22 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
schedule:
- cron: '0 0 * * *'
env:
CAMPAIGN: 'ps_cashondelivery'
MODULE_NAME: 'ps_cashondelivery'
jobs:
ui_test:
name: UI Tests
Expand All @@ -22,25 +22,37 @@ jobs:
fail-fast: false
matrix:
PS_VERSION:
- '1.7.6.9'
- '1.7.7.8'
- '1.7.8.11'
- '8.0.5'
- '8.1.6'
- '8.2.0'
#- '1.7.6.9'
#- '1.7.7.8'
#- '1.7.8.11'
#- '8.0.5'
#- '8.1.6'
#- '8.2.0'
- 'nightly'
env:
PS_VERSION: ${{ matrix.PS_VERSION }}
steps:
- name: Checkout
uses: actions/[email protected]

## Create ZIP file
- name: Install composer dependencies
run: composer install --no-dev -o

- name: Build ZIP file
run: |
cd ..
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
cd ${{ github.event.repository.name }}
## Docker
- name: Start containers
working-directory: tests/UI/
run: |
docker compose -f "docker-compose.yml" up -d --build
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose -f "docker-compose.yml" up -d --build
bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/en/)" != "200" ]]; do sleep 5; done'
## UI Tests
- name: Install dependencies
working-directory: tests/UI/
run: npm ci
Expand All @@ -52,7 +64,10 @@ jobs:
- name: Run Playwright tests
working-directory: tests/UI/
run: npx playwright test
env:
URL_ZIP: http://localhost/${{ github.event.repository.name }}.zip

## Errors
- name: Export Docker errors
working-directory: tests/UI/
if: always()
Expand Down Expand Up @@ -106,7 +121,7 @@ jobs:
working-directory: tests/UI/
run: |
mkdir -p nightly
REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
REPORT_NAME="${{ env.MODULE_NAME }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
mv report.json nightly/${REPORT_NAME}.json
# Nightly : Auth GCP
Expand All @@ -128,5 +143,5 @@ jobs:
# Nightly : Push Report
- name: "Nightly : Push Report"
run: |
REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json&campaign=${{ env.CAMPAIGN }}&platform=chromium"
REPORT_NAME="${{ env.MODULE_NAME }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}"
curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json&campaign=${{ env.MODULE_NAME }}&platform=chromium"
Loading

0 comments on commit a820fce

Please sign in to comment.