Skip to content

Commit

Permalink
Add trigger on push to test
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-zuffinetti committed Nov 2, 2023
1 parent 2897437 commit dc4e95f
Showing 1 changed file with 11 additions and 64 deletions.
75 changes: 11 additions & 64 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
continue-on-error: true
with:
app_id: ${{ secrets.ALMA_UPDATE_CHECKS_APP_ID }}
private_key: ${{ secrets.ALMA_UPDATE_CHECKS_APP_PEM }}
tests:

- uses: LouisBrunner/[email protected]
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/[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
steps:
- name: Run unit tests
run: make test

0 comments on commit dc4e95f

Please sign in to comment.