Skip to content

Commit

Permalink
e2e PR & workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
davidPrestashop committed Jul 19, 2024
1 parent 83b22d4 commit 618b81a
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/actions/e2e/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 'e2e tests'

description: ''
inputs:
ps-version:
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/e2e-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: E2e

on:
workflow_call:
inputs:
ps-version:
description: 'Prestashop version (if latest no Php version needed).'
type: string
required: false
default: latest
php-version:
description: 'Php version'
type: string
required: false
default: 8.1
workflow_dispatch:
inputs:
ps-version:
description: 'Prestashop version (if latest no Php version needed) \n
Compatibility: \n
ps8.x.x with php 8.1, 8.0, 7.4, 7.3, 7.2, 7.1 \n
ps1.7.8.x with 7.4, 7.3, 7.2, 7.1 \n
ps1.7.7.x with 7.3, 7.2, 7.1 \n
ps1.7.5.x & ps1.7.6.x with php 7.2, 7.1, 7.0 \n
ps1.7.0.x to ps1.7.4.x with php 7.1, 7.0
ps1.6.1.x with php 7.1, 7.0, 5.6'
default: 'latest'
type: choice
options:
- latest
- 8.1.7
- 8.0.5
- 1.7.8.11
- 1.7.7.8
- 1.7.6.9
- 1.7.5.2
- 1.7.4.4
- 1.7.3.4
- 1.7.2.5
- 1.7.1.2
- 1.7.0.6
- 1.6.1.24
php-version:
description: 'Php version'
default: '8.1'
type: choice
options:
- 8.1
- 8.0
- 7.4
- 7.3
- 7.2
- 7.1
- 7.0
- 5.6

env:
DOCKER_COMPOSE_VERSION: v2.27.0
NODE_BUILDER_VERSION: "20"

jobs:
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: latest

- name: Auth Docker GCP
uses: ./.github/actions/auth-docker-gcp
with:
workload-identity-provider: ${{ secrets.WI_PROVIDER_INTEGRATION }}
service-account: ${{ secrets.WI_SA_INTEGRATION }}

- name: e2e tests
uses: ./.github/actions/e2e
with:
ps-version: ${{ inputs.ps-version }}
php-version: ${{ inputs.php-version }}
docker-compose-version: ${{ env.DOCKER_COMPOSE_VERSION }}
node-builder-version: ${{ env.NODE_BUILDER_VERSION }}

- name: Slack notification on failures
if: github.event_name == 'schedule' && failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: EC1111
SLACK_TITLE: E2E Capture tests PS$${{ inputs.ps-version }} & Php${{ inputs.php-version }}
SLACK_MESSAGE: The latest E2E Capture tests failed :(
SLACK_FOOTER: 'Review the last github actions here: https://github.com/PrestaShopCorp/cloudsync/actions/workflows/e2e.yml'
SLACK_USERNAME: QABot
SLACK_CHANNEL: squad-cloudsync-qa
SLACK_ICON: https://avatars.githubusercontent.com/u/56089550?s=48&v=4

- name: Slack notification on success
if: github.event_name == 'schedule' && success()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: 0CAD34
SLACK_TITLE: E2E Capture tests PS${{ matrix.ps-version }} & Php${{ matrix.php-version }}
SLACK_MESSAGE: ✓ The latest E2E Capture tests just passed!
SLACK_FOOTER: ''
SLACK_USERNAME: QABot
SLACK_CHANNEL: squad-cloudsync-qa
SLACK_ICON: https://avatars.githubusercontent.com/u/56089550?s=48&v=4
9 changes: 2 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: E2e

on:
schedule:
- cron: '1 0 * * *'

env:
DOCKER_COMPOSE_VERSION: v2.27.0
NODE_BUILDER_VERSION: "20"
Expand All @@ -17,7 +13,7 @@ jobs:
fail-fast: false
matrix:
include:
- ps-version: 8.1.6
- ps-version: 8.1.7
php-version: 8.2
- ps-version: 8.0.5
php-version: 8.2
Expand All @@ -41,8 +37,7 @@ jobs:
php-version: 7.1
- ps-version: 1.6.1.24
php-version: 7.1
- ps-version: 1.7.3.4
php-version: 7.1

steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand Down

0 comments on commit 618b81a

Please sign in to comment.