Skip to content

Commit

Permalink
Add UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nesrineabdmouleh committed Jul 11, 2024
1 parent 0869e9d commit 65654e0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJSON(needs.ui_test_matrix.outputs.matrix) }}
env:
PS_DOCKER: ${{ matrix.PS_VERSION_START }}-${{ matrix.PHP_VERSION }}
PS_DOCKER: ${{ matrix.IMG_DOCKER }}
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -48,7 +48,7 @@ jobs:
PS_VERSION: ${{ env.PS_DOCKER }}
run: |
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'
bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/)" != "200" ]]; do sleep 5; done'
- name: Composer install
run: composer install
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Upgrade
run: |
docker exec -t prestashop php modules/autoupgrade/cli-upgrade.php --dir=admin-dev --channel=${{ matrix.UPGRADE_CHANNEL }}
docker exec -t prestashop chmod 777 -R /var/www/html/var/cache/dev
docker exec -t prestashop chmod 777 -R /var/www/html/var/cache/
- name: Install dependencies
working-directory: tests/UI/
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/ui-test/sanity.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
{
"include": [
{
"comment": "1.7.5 ~ major PHP 7.2"
},
{
"PS_VERSION_START": "1.7.5.0",
"PS_VERSION_END": "8.1.7",
"UPGRADE_CHANNEL": "major",
"PHP_VERSION": "7.2",
"IMG_DOCKER": "1.7.5.0"
},
{
"PS_VERSION_START": "1.7.5.1",
"PS_VERSION_END": "8.1.7",
"UPGRADE_CHANNEL": "major",
"PHP_VERSION": "7.2",
"IMG_DOCKER": "1.7.5.1"
},
{
"comment": "@todo 1.7.5.2"
},
{
"comment": "1.7.8 ~ minor PHP 7.2 ~ 7.4"
},
{
"PS_VERSION_START": "1.7.8.10",
"PS_VERSION_END": "1.7.8.11",
"UPGRADE_CHANNEL": "minor",
"PHP_VERSION": "7.4"
"PHP_VERSION": "7.4",
"IMG_DOCKER": "1.7.8.10-7.4-apache"
},
{
"comment": "1.7.8 ~ major PHP 7.2 ~ 7.4"
Expand All @@ -16,7 +37,8 @@
"PS_VERSION_START": "1.7.8.11",
"PS_VERSION_END": "8.1.7",
"UPGRADE_CHANNEL": "major",
"PHP_VERSION": "7.4"
"PHP_VERSION": "7.4",
"IMG_DOCKER": "1.7.8.11-7.4-apache"
},
{
"comment": "8.0.5 ~ minor PHP 7.2 ~ 8.1"
Expand All @@ -25,7 +47,8 @@
"PS_VERSION_START": "8.0.5",
"PS_VERSION_END": "8.1.7",
"UPGRADE_CHANNEL": "minor",
"PHP_VERSION": "8.1"
"PHP_VERSION": "8.1",
"IMG_DOCKER": "8.0.5-8.1-apache"
},
{
"comment": "8.1.6 ~ minor PHP 7.2 ~ 8.1"
Expand All @@ -34,7 +57,8 @@
"PS_VERSION_START": "8.1.6",
"PS_VERSION_END": "8.1.7",
"UPGRADE_CHANNEL": "minor",
"PHP_VERSION": "8.1"
"PHP_VERSION": "8.1",
"IMG_DOCKER": "8.1.6-8.1-apache"
}
]
}
2 changes: 1 addition & 1 deletion tests/UI/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.7'

services:
prestashop:
image: prestashop/prestashop:${PS_VERSION}-apache
image: prestashop/prestashop:${PS_VERSION}
container_name: prestashop
depends_on:
- mysql
Expand Down

0 comments on commit 65654e0

Please sign in to comment.