Skip to content

Commit

Permalink
run workflow from custom branch (#1774)
Browse files Browse the repository at this point in the history
Co-authored-by: Szymon Sadkowski <szymon.sadkowski@neptune.ai>
  • Loading branch information
szysad and Szymon Sadkowski authored May 14, 2024
1 parent 159f577 commit b3311f4
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 64 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: e2e

on:
workflow_call:
inputs:
neptune_ref:
description: 'Reference to neptune-client branch to use while running e2e tests (can be a branch, tag, or commit SHA)'
type: string
required: false
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Run every day at arbitrary time (4:00 AM UTC)
push:
branches:
- dev/1.x
Expand All @@ -18,7 +21,12 @@ env:
SERVICE_ACCOUNT_NAME: ${{ secrets.E2E_SERVICE_ACCOUNT_NAME }}

jobs:
set_neptune_ref:
uses: ./.github/workflows/set_neptune_ref.yml
with:
workflow_call_input_neptune_ref: ${{ inputs.neptune_ref }}
e2e:
needs: [ set_neptune_ref ]
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -37,7 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ needs.set_neptune_ref.outputs.neptune_ref }}

- name: Test
uses: ./.github/actions/test-e2e
Expand All @@ -52,6 +60,7 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_management:
needs: [ set_neptune_ref ]
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -70,7 +79,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ needs.set_neptune_ref.outputs.neptune_ref }}

- name: Test
uses: ./.github/actions/test-e2e
Expand All @@ -85,6 +94,7 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_s3_gcs:
needs: [ set_neptune_ref ]
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -103,7 +113,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ needs.set_neptune_ref.outputs.neptune_ref }}

- name: Test
uses: ./.github/actions/test-e2e
Expand All @@ -121,6 +131,7 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_s3:
needs: [ set_neptune_ref ]
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -139,7 +150,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ needs.set_neptune_ref.outputs.neptune_ref }}

- name: Test
uses: ./.github/actions/test-e2e
Expand All @@ -156,15 +167,15 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e-tests-notify:
needs: [ e2e, e2e_management, e2e_s3_gcs, e2e_s3 ]
needs: [ e2e, e2e_management, e2e_s3_gcs, e2e_s3, set_neptune_ref ]
runs-on: ubuntu-latest
if: (success() || failure()) && github.ref == 'refs/heads/dev/1.x'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}
ref: ${{ needs.set_neptune_ref.outputs.neptune_ref }}

- name: Notify
uses: ./.github/actions/workflow-notify
Expand Down
Loading

0 comments on commit b3311f4

Please sign in to comment.