Skip to content

Do not use yet.. 💣 or at least don't blame anyone but yourself when things change or crash your production 🔥

License

Notifications You must be signed in to change notification settings

fridaybyte/golangci-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GolangCI-Test

GolangCI-Test creates a simple way to run concurrent tests on multiple instances while using standard Go built-in tools. This approach should hopefully enable minimum maintenance, but at the same time maximum flexibility.

Warning

If you somehow end up on this repo, please wait a few days before using it. It goes through a lot of changes, and it's not ready for production use yet.

Usage

Installation

go install github.com/mflotynski/golangci-test

Configuration

Suggested configuration for Gitlab CI

Use cache per branch to store the package splits between jobs.

cache:
  key: "$CI_COMMIT_REF_NAME"
  paths:
    - .golangci-test-splits.json

The first pipeline per branch may be slower because it won't balance the packages based on their tests' execution time. It will split them evenly instead. If all your tests are short, this should probably be a good enough solution.

If not, then you may try to avoid this by using a global cache generated by the main branch only. All branches will pull this file. Obviously, feature branches will usually have more or less tests than the main branch, so the splits may still not be optimal. Yet, if you tend to have small feature branches, this should be a good solution.

New packages with tests (not existing in main branch) will be distributed evenly between the instances.

  cache:
    paths:
      - .golangci-test-splits.json
    policy: pull

About

Do not use yet.. 💣 or at least don't blame anyone but yourself when things change or crash your production 🔥

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages