Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add run name and start url for e2e tests and docker nighly command (no-changelog) #4800

Merged
merged 7 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/docker-images-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Docker Nightly Image CI
run-name: Build ${{ inputs.branch }} - ${{ inputs.user }}

on:
schedule:
Expand All @@ -22,6 +23,14 @@ on:
type: boolean
required: true
default: false
user:
description: ''
required: false
default: 'schedule'
start-url:
description: 'URL to call after workflow is kicked off.'
required: false
default: ''
success-url:
description: 'URL to call after Docker Image got built successfully.'
required: false
Expand All @@ -32,6 +41,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Call Start URL - optionally
run: |
[[ "${{github.event.inputs.start-url}}" != "" ]] && curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
shell: bash

- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
name: End-to-End tests
run-name: E2E Tests ${{ inputs.branch }} - ${{ inputs.user }}

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
branch:
description: 'GitHub branch to test.'
required: false
default: 'master'
user:
description: 'User who kicked this off.'
required: false
default: 'schedule'
start-url:
description: 'URL to call after workflow is kicked off.'
required: false
default: ''
success-url:
description: 'URL to call after workflow is done.'
required: false
default: ''

jobs:
build:
Expand All @@ -16,7 +34,15 @@ jobs:
node-version: [14.x, 16.x]

steps:
- name: Call Start URL - optionally
run: |
[[ "${{github.event.inputs.start-url}}" != "" ]] && curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
shell: bash

- uses: actions/checkout@v3
with:
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
ref: ${{ github.event.inputs.branch || 'master' }}

- uses: pnpm/action-setup@v2.2.4

Expand Down Expand Up @@ -44,3 +70,9 @@ jobs:
status: ${{ job.status }}
channel: '#updates-build-alerts'
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: Tests failure for branch `${{ inputs.branch }}` deployed by ${{ inputs.user }}

- name: Call Success URL - optionally
run: |
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is GET because that's what the other workflow does ? it might make sense to eventually make this POST and add branch name and user name in the payload.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya you are right.. post makes more sense.. but would break two workflows, one of which Jan owns.. that's why I did not bother at this point

shell: bash