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: use locally-installed redis instead of dockerized one #113

Merged
merged 1 commit into from
Jul 6, 2020
Merged

ci: use locally-installed redis instead of dockerized one #113

merged 1 commit into from
Jul 6, 2020

Conversation

uki00a
Copy link
Member

@uki00a uki00a commented Jul 6, 2020

Towards #104 and #110.

@uki00a
Copy link
Member Author

uki00a commented Jul 6, 2020

@tumile I modified the CI workflow to use the locally-installed Redis instead of the dockerized one.
Can you check this PR please?

@uki00a uki00a changed the title build: use locally-installed redis instead of dockerized one ci: use locally-installed redis instead of dockerized one Jul 6, 2020
@uki00a uki00a merged commit 865842b into denodrivers:master Jul 6, 2020
@uki00a uki00a deleted the use-locally-installed-redis-in-ci branch July 6, 2020 22:17
@uki00a uki00a mentioned this pull request Jul 6, 2020
26 tasks
- name: Install and start Redis
run: |
make testdeps
make start-redis
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to start redis here? I think this can be handled by the test suite with startRedisServer. It's probably better to do it in code, we may have more control over the configuration.

Copy link
Member Author

@uki00a uki00a Jul 6, 2020

Choose a reason for hiding this comment

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

It's because I prioritized making testing easier in a local environment.
Some people might already run Redis locally, but others might do in a Docker container.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ummm, but I also don't want the test to fail because of environmental differences.
Thinking so, using startRedisServer isn't a bad idea... 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I was also thinking what if the redis-server instance already running on a user's machine have some conflicting configs like cluster-enabled for example, it will break normal tests

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I'll change the tests later to use startRedisServer to start the testing Redis.

Comment on lines +52 to +56
${TESTDATA_DIR}/redis/src/redis-server --port 6379 --daemonize yes

kill-redis:
${TESTDATA_DIR}/redis/src/redis-cli -p 6379 shutdown
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I think it's more versatile to start and kill redis-server in code

Comment on lines 3 to 4
redis:
docker run -p 6379:6379 -d -t redis:5
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still relevant now that we use a local instance of redis?

@tumile
Copy link
Contributor

tumile commented Jul 6, 2020

Oops, I see that this has already been merged 😅. I left a couple of thoughts though, hope you can take a look.

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