Develop #552
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
--- | |
name: E2E Test | |
on: | |
pull_request: | |
branches: ["main", "develop"] | |
types: ["opened", "synchronize", "reopened", "ready_for_review"] | |
workflow_dispatch: | |
jobs: | |
launch: | |
strategy: | |
matrix: | |
version: | |
- 1.7.8.7 | |
#- 1.7.7.5 | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Get only last part of branch name in $SLUG_VERSION env var | |
run: | | |
VERSION=${{ matrix.version }} | |
echo "SLUG_VERSION=${VERSION//./-}" >> $GITHUB_ENV | |
- name: Generate token | |
id: generate_token | |
uses: tibdex/[email protected] | |
continue-on-error: true | |
with: | |
app_id: ${{ secrets.ALMA_UPDATE_CHECKS_APP_ID }} | |
private_key: ${{ secrets.ALMA_UPDATE_CHECKS_APP_PEM }} | |
- uses: LouisBrunner/[email protected] | |
id: e2e_status | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
name: E2E Test / result (${{ matrix.version }}) | |
status: "in_progress" | |
- name: Generate Github token for integration-infrastructure repo | |
id: generate_github_token_integration_infrastructure | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.ALMA_WF_TRIGGER_APP_ID }} | |
private_key: ${{ secrets.ALMA_WF_TRIGGER_APP_PEM }} | |
installation_id: ${{ secrets.ALMA_WF_TRIGGER_INSTALLATION_ID }} | |
repository: alma/integration-infrastructure | |
- name: Invoke e2e workflow with inputs | |
uses: benc-uk/[email protected] | |
with: | |
workflow: Deploy CMS | |
token: ${{ steps.generate_github_token_integration_infrastructure.outputs.token }} | |
repo: alma/integration-infrastructure | |
ref: main | |
inputs: > | |
{ | |
"name": "e2e-${{ github.run_id }}", | |
"alma_plugin_branch": "${{ github.head_ref || github.ref_name }}", | |
"alma_plugin_test_branch" : "main", | |
"cms": "prestashop-${{ matrix.version }}", | |
"e2e": "true", | |
"e2e_check_id": "${{ steps.e2e_status.outputs.check_id }}", | |
"e2e_check_origin" : "${{ github.repository }}" | |
} | |
- uses: LouisBrunner/[email protected] | |
if: failure() | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
check_id: ${{ steps.e2e_status.outputs.check_id }} | |
conclusion: failure |