Skip to content

Speed up integration pipeline#128

Description

@steeevin88

i think some caching (amongst other things) can be done to speed up running integration tests in the pipeline added in #110

here's what gemini said maybe they're good recs 馃槃

Here are a few of the most effective ways to speed this pipeline up:

1. Cache Your Docker Layers
Right now, docker compose up --build is pulling and building everything cold. You can use the actions/cache step in your workflow to save Docker image layers between runs. Next time, it鈥檒l only download what has actually changed.

Pro-tip: If you switch to using Docker Buildx in your action, it has built-in support for GitHub Actions caching (cache-from and cache-to).

2. Use Native GitHub Actions "Service Containers"
Instead of spinning up docker-compose inside a run step, you can define your dependencies (Mongo, Redis) as services directly in your .github/workflows/integration.yml file.

GitHub provisions these natively alongside your runner. It's often much faster and eliminates the overhead of managing docker-compose lifecycle and teardowns yourself.

3. Parallelize the Tests
If the Go integration tests themselves take a while after the containers are up, make sure your tests are designed to run concurrently and use the go test -parallel flag.

Activity

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

Metadata

Metadata

Assignees

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