From dc4e95f3fc870261c48ec2fb50fc077bc9c224a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Zuffinetti?= Date: Thu, 2 Nov 2023 11:05:11 +0100 Subject: [PATCH] Add trigger on push to test --- .github/workflows/ci.yaml | 75 ++++++--------------------------------- 1 file changed, 11 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e3d7a258..7707e2bda 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,71 +1,18 @@ ---- -name: E2E Test +name: Continuous Integration + on: + push: pull_request: - branches: ["main", "develop"] - types: ["opened", "synchronize", "reopened", "ready_for_review"] + branches: + - main + - develop 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/github-app-token@v1.8.0 - continue-on-error: true - with: - app_id: ${{ secrets.ALMA_UPDATE_CHECKS_APP_ID }} - private_key: ${{ secrets.ALMA_UPDATE_CHECKS_APP_PEM }} + tests: - - uses: LouisBrunner/checks-action@v1.6.2 - id: e2e_status - with: - token: ${{ steps.generate_token.outputs.token }} - name: E2E Test / result (${{ matrix.version }}) - status: "in_progress" + runs-on: ubuntu-22.04 - - 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/workflow-dispatch@v1.2.2 - 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/checks-action@v1.6.2 - if: failure() - with: - token: ${{ steps.generate_token.outputs.token }} - check_id: ${{ steps.e2e_status.outputs.check_id }} - conclusion: failure + steps: + - name: Run unit tests + run: make test