-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Functional Tests : Cash on delivery (COD) module: Upgrade module
- Loading branch information
Showing
8 changed files
with
454 additions
and
22 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ on: | |
schedule: | ||
- cron: '0 0 * * *' | ||
env: | ||
CAMPAIGN: 'ps_cashondelivery' | ||
MODULE_NAME: 'ps_cashondelivery' | ||
jobs: | ||
ui_test: | ||
name: UI Tests | ||
|
@@ -22,23 +22,39 @@ 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 Artifact | ||
- name: Install composer dependencies | ||
run: composer install --no-dev -o | ||
- name: Clean-up project | ||
uses: PrestaShopCorp/[email protected] | ||
- name: Prepare auto-index tool | ||
run: composer global require prestashop/autoindex | ||
- name: Generate index.php | ||
run: ~/.composer/vendor/bin/autoindex | ||
- name: Create & upload artifact | ||
uses: actions/upload-artifact@v4 | ||
id: artifact-upload | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: /home/runner/work/${{ github.event.repository.name }} | ||
|
||
- 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' | ||
- name: Install dependencies | ||
|
@@ -52,6 +68,8 @@ jobs: | |
- name: Run Playwright tests | ||
working-directory: tests/UI/ | ||
run: npx playwright test | ||
env: | ||
URL_ZIP: ${{ steps.artifact-upload.outputs.artifact-url }} | ||
|
||
- name: Export Docker errors | ||
working-directory: tests/UI/ | ||
|
@@ -106,7 +124,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 | ||
|
@@ -128,5 +146,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" |
Oops, something went wrong.