Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github workflow e2e matrix: prestashop version & php version #301

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2cd2535
github workflow e2e matrix: prestashop version & php version
davidPrestashop May 29, 2024
46990c8
Merge branch 'main' into test/ci-ps-php-versions
Clap404 Jun 10, 2024
88040bc
Merge remote-tracking branch 'origin/main' into test/ci-ps-php-versions
davidPrestashop Jun 17, 2024
2ca519e
docker mariadb lts/healthcheck
davidPrestashop Jun 18, 2024
bb4067f
Merge remote-tracking branch 'origin/test/ci-ps-php-versions' into te…
davidPrestashop Jun 18, 2024
3394a1f
github workflow e2e matrix: prestashop & php versions
davidPrestashop Jun 20, 2024
815ce74
Merge remote-tracking branch 'origin/main' into test/ci-ps-php-versions
davidPrestashop Jun 26, 2024
a52b37a
actions/workflows e2e matrix: prestashop & php versions
davidPrestashop Jun 26, 2024
ba3b52e
actions/workflows e2e matrix: prestashop & php versions
davidPrestashop Jul 5, 2024
32c01ff
Merge remote-tracking branch 'origin/main' into test/ci-ps-php-versions
davidPrestashop Jul 19, 2024
a3aa085
matrix
davidPrestashop Jul 19, 2024
83b22d4
oups
davidPrestashop Jul 19, 2024
618b81a
e2e PR & workflow_dispatch
davidPrestashop Jul 19, 2024
3f864f2
pS1.6.x php versions compatibility
davidPrestashop Jul 19, 2024
c5d9211
pS1.6.x php versions compatibility
davidPrestashop Jul 19, 2024
5226066
slack
davidPrestashop Jul 19, 2024
e15efe4
Merge remote-tracking branch 'origin/main' into test/ci-ps-php-versions
davidPrestashop Sep 3, 2024
e57dbad
Merge remote-tracking branch 'origin/main' into test/ci-ps-php-versions
davidPrestashop Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:

on:
pull_request:
types: [opened, reopened, synchronize]
types: [ opened, reopened, synchronize ]
push:
branches:
- "main"
Expand All @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
php_version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
php_version: [ "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2" ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
strategy:
matrix:
# @TODO: "1.6.1.24" is temporarily disabled here
ps_version: ["1.7.8.10", "8.1.4"]
ps_version: [ "1.7.8.10", "8.1.4" ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -86,14 +86,36 @@ jobs:
- name: PHP unit
run: make phpunit

setup-matrix:
name: Create campaign matrix
runs-on: ubuntu-latest
steps:
- name: Create Matrix
id: matrixSetup
shell: bash
run: |
declare -a ps_version=()

if [[ "${{ github.event_name }}" == "schedule" ]]; then
ps_version=({ps:8.1.4, php:8.1}, {ps:8.0.5, php:8.1}, {ps:1.7.8.11, php:7.4}, {ps:1.7.7.8, php:7.3}, {ps:1.7.6.9, php:7.2}, {ps:1.7.5.2, php:7.2}, {ps1.7.4.4:, php:7.1}, {ps:1.7.3.4, php:7.1}, {ps:1.7.2.5, php:7.1}, {ps:1.7.1.2, php:7.1}, {ps:1.6.1.24, php:7.1})
else
ps_version=({ps:8.1.4, php:8.1}, {ps:1.7.8.11, php:7.4}, {ps:nightly, php:8.1})
fi;

echo "matrix=$(jq -n --argjson ps_version "$(printf '%s\n' "${ps_version[@]}" | jq -R '.' | jq -s .)" '{ps_version: ps_version' | jq -c .)" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.matrixSetup.outputs.matrix }}

e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ github.event_name == 'pull_request' }}
needs: setup-matrix
strategy:
fail-fast: false
max-parallel: 1
matrix:
ps_version: ["1.7.8.10", "8.1.4", "nightly"]
ps_version: ${{ fromJson(needs.setup-matrix.outputs.matrix).ps_version }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -129,16 +151,16 @@ jobs:
run: pnpm install --no-optional --force
working-directory: e2e

- name: Setup e2e-env with Prestashop ${{ matrix.ps_version }}
- name: Setup e2e-env with Prestashop ${{ matrix.ps_version.ps }}:${{ matrix.ps_version.php }}
run: |
cp .env.dist .env
docker compose build
docker compose up --detach --wait
env:
DOCKER_IMAGE_PRESTASHOP: prestashop/prestashop-flashlight:${{matrix.ps_version}}
DOCKER_IMAGE_PRESTASHOP: prestashop/prestashop-flashlight:${{matrix.ps_version.ps}}
working-directory: e2e-env

- name: Run e2e:tests with Prestashop ${{ matrix.ps_version }}
- name: Run e2e:tests with Prestashop ${{ matrix.ps_version.ps }}:${{ matrix.ps_version.php }}
run: pnpm test:e2e
working-directory: e2e

Expand Down
Loading