From d0479a402bf2a1f444e913940fb2b7ac19db405d Mon Sep 17 00:00:00 2001 From: yasserfaraazkhan Date: Sun, 28 Jan 2024 22:57:38 +0530 Subject: [PATCH] test commit --- .github/workflows/e2e-functional.yml | 16 ++++++++++---- .github/workflows/nightly-builds.yaml | 32 ++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e-functional.yml b/.github/workflows/e2e-functional.yml index fd495258..e73c15e0 100644 --- a/.github/workflows/e2e-functional.yml +++ b/.github/workflows/e2e-functional.yml @@ -7,6 +7,10 @@ on: description: "Reference tag of the nightly build" required: true type: string + trigger_type: + description: "Nightly Schedule Trigger" + required: true + type: string push: branches: - master @@ -48,6 +52,7 @@ env: WEBHOOK_URL: ${{ secrets.MM_DESKTOP_E2E_WEBHOOK_URL }} ZEPHYR_API_KEY: ${{ secrets.MM_DESKTOP_E2E_ZEPHYR_API_KEY }} BUILD_ID: ${{ github.run_id }} + TRIGGER_TYPE: ${{ inputs.trigger_type }} jobs: e2e-linux: @@ -74,7 +79,10 @@ jobs: }} runs-on: ubuntu-latest steps: - + - name: Run E2E Tests + run: | + echo "Running E2E Tests..." + echo "Trigger Type: ${{ matrix.trigger_type }}" - name: ci/checkout-repo uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - name: ci/setup-node @@ -95,7 +103,7 @@ jobs: - name: Set Environment Variables run: | - echo "*********", $BUILD_ID + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV echo "BUILD_SUFFIX=desktop-pr" >> $GITHUB_ENV @@ -188,7 +196,7 @@ jobs: - name: Set Environment Variables run: | - echo "*********", $BUILD_ID + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV echo "BUILD_SUFFIX=desktop-pr" >> $GITHUB_ENV @@ -284,7 +292,7 @@ jobs: - name: Set Environment Variables shell: bash run: | - echo "*********", $BUILD_ID + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV echo "BUILD_SUFFIX=desktop-pr" >> $GITHUB_ENV diff --git a/.github/workflows/nightly-builds.yaml b/.github/workflows/nightly-builds.yaml index c951bf46..99fd2de7 100644 --- a/.github/workflows/nightly-builds.yaml +++ b/.github/workflows/nightly-builds.yaml @@ -1,6 +1,10 @@ name: nightly-builds on: + workflow_run: + workflows: ["e2e-functional.yml"] + types: + - completed workflow_dispatch: schedule: - cron: '*/5 * * * *' @@ -43,10 +47,26 @@ jobs: # with: # tag: ${{ needs.tag-nightly-build.outputs.tag }} + # nightly-e2e: + # needs: + # - tag-nightly-build + # uses: ./.github/workflows/e2e-functional.yml + # secrets: inherit + # with: + # tag: ${{ needs.tag-nightly-build.outputs.tag }} + # trigger_type: ${{ github.event.inputs.trigger_event }} + nightly-e2e: - needs: - - tag-nightly-build - uses: ./.github/workflows/e2e-functional.yml - secrets: inherit - with: - tag: ${{ needs.tag-nightly-build.outputs.tag }} + runs-on: ubuntu-latest + needs: tag-nightly-build + steps: + - name: Trigger e2e-test.yml workflow + uses: aurelien-baudet/workflow-dispatch@v2.1.1 + with: + workflow: "e2e-functional.yml" + token: ${{ secrets.MATTERMOST_BUILD_GH_TOKEN }} + inputs: | + { + "tag": "${{ needs.tag-nightly-build.outputs.tag }}", + "trigger_event": "workflow_call" + } \ No newline at end of file