Skip to content

Local development and CI using test containers #207

Open

Description

@Meir017

Using test containers (https://dotnet.testcontainers.org/) will improve the developer experience and allow having a cross platform CI without maintaining anything in the environment (other than having docker installed)

Activity

  1. madelson commented on May 8, 2024

    @madelson
    Owner

    I agree this would be a great idea, especially if it can create and easy path towards enabling a larger portion of the suite to run through GitHub actions.

    @Meir017 is this something you’re interested in contributing? If so, let’s discuss what the implications would be for the code base and developer experience.

  2. added
    cleanupCode cleanup and other maintenance changes that do not affect runtime behavior
    on May 8, 2024
  3. Meir017 commented on May 9, 2024

    @Meir017
    Author

    @madelson I'll be happy to contribute here.
    I was thinking of starting with the Redis provider here - I'll need to see how to enable just a subset of the test to make this be a gradual effort

    From what I see on other projects using test-containers, we could just use the ubuntu image (see https://github.com/actions/runner-images/blob/ubuntu22/20240212.1/images/ubuntu/Ubuntu2204-Readme.md having docker already installed, and a working example https://github.com/filipsnastins/testcontainers-github-actions/actions/runs/7959995426/job/21728056781?pr=80)

  4. madelson commented on May 9, 2024

    @madelson
    Owner

    Redis makes sense as a place to start. The tests are pretty well organized by namespace/category (and more could be done if that’s not sufficient), so it shouldn’t be terribly difficult to run just the redis tests through nunit.

  5. douglasg14b commented on May 24, 2024

    @douglasg14b

    If you're talking about black box tests, you can standup a test environment in github actions with docker-compose, and run tests against those environments. You can add an abstraction over it with Tilt if desired.

    This has the advantage of not leaking the test env into your code, but afaik is fundamentally the same as testcontainers 🤔

    You end up just standup up the envs for redis, postgres....etc using their already existing images. It's quite convenient :)

  6. Meir017 commented on May 24, 2024

    @Meir017
    Author

    @douglasg14b would this affect the local development experience? Would developers still need to install locally thr different dependencies?

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

    cleanupCode cleanup and other maintenance changes that do not affect runtime behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions