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

Add docker-based setup for running test workflows #274

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeanpaul
Copy link
Contributor

@jeanpaul jeanpaul commented Sep 6, 2024

This setup allows you to run the tests with docker compose, without ensuring your own ~/.n8n is clean and/or backed up.

Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

I like where this is going, but left a few comments/questions 🙏🏽

@@ -0,0 +1,24 @@
services:
n8n:
Copy link
Member

Choose a reason for hiding this comment

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

why do we want everything in docker here? I thought what we wanted was to run only external services in docker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Locally, I'd also love to run n8n in docker, so that I don't need to tear down my n8n home instance. Of course I can do that differently, but this means that you don't forget when running your tests.
Do you think we should remove it from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plus: this makes it easy to create your test-workflows inside the docker; makes it easy to connect over the local docker-network, etc.

echo | pnpm install

echo building n8n
pnpm build
Copy link
Member

Choose a reason for hiding this comment

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

we could save some time by skipping frontend build using pnpm build:backend

Copy link
Member

Choose a reason for hiding this comment

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

by building inside docker (instead of directly on the CI VM), we can't use the turbo build cache. We also can't reuse a built version of n8n from a previous step in the CI.

perhaps we should update this script to assume that n8n is already built when these tests start?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can remove that step!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants