mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
b3adcbd813
ci: Disable CI jobs on nodejs 14.x This is temporary until I figure out why CI jobs keep randomly failing on nodejs 14.x
88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
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:
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 30
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [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
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Test E2E
|
|
run: |
|
|
pnpm cypress:install
|
|
pnpm test:e2e:all
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
if: failure()
|
|
with:
|
|
name: cypress-screenshots
|
|
path: |
|
|
cypress/screenshots
|
|
retention-days: 1
|
|
|
|
- name: Notify Slack on failure
|
|
uses: act10ns/slack@v2.0.0
|
|
if: failure()
|
|
with:
|
|
status: ${{ job.status }}
|
|
channel: '#updates-build-alerts'
|
|
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
message: E2E failure for branch `${{ inputs.branch || 'master' }}` deployed by ${{ inputs.user || 'schedule' }} (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
|
|
- name: Call Success URL - optionally
|
|
run: |
|
|
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
|
|
shell: bash
|