Skip to content

Set CI env variables聽#65

Open
Open

Description

@Uzlopak

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

馃殌 Feature Proposal

Set Env variables liks CI, CI_REDIS, CI_MONGO etc. to make it possigle to detect runs in CI by the tests.

Motivation

I would lke to run fastify-session plugin one time with in in memory store and once with redis.

Example

No response

Activity

  1. Uzlopak commented on Aug 16, 2022

    @Uzlopak
    ContributorAuthor

    THe thing is: If I have the information, that I am in environment CI_REDIS, I can run unit tests, which need a redis server. Like fastify/session with redis session store.

  2. Fdawgs commented on Aug 20, 2025

    @Fdawgs
    Member

    @Uzlopak Bit unclear on the ask here. Is this still needed?

  3. Uzlopak commented on Aug 20, 2025

    @Uzlopak
    ContributorAuthor

    I think it is a nice to have. But nowadays I think it should be something ilke REDIS_SERVER MONGODB_SERVER etc..

    E.g. fastify/session has redis support, which is untested. And people complain that redis-connect is broken. But we dont see it, because the redis use case is not tested.

    In other repos we set REDIS_SERVER as environment variable. Dont ask me which project. And the unit tests for redis skip if REDIS_SERVER is not set. Good thing is you can start and stop a dockerized redis server via a npm script like start:redis and stop:redis and test the redis cases locally too. So CI_REDIS would be inappropriate for local testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions