Songmu / Gotesplit
Licence: mit
Splits the testing in Go into a subset and run it. It is useful for the CI environment.
Stars: ✭ 23
Projects that are alternatives of or similar to Gotesplit
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+31208.7%)
Mutual labels: ci
Captain
Captain - Convert your Git workflow to Docker 🐳 containers
Stars: ✭ 739 (+3113.04%)
Mutual labels: ci
Super Linter
Combination of multiple linters to install as a GitHub Action
Stars: ✭ 7,445 (+32269.57%)
Mutual labels: ci
Concourse
Concourse is a container-based continuous thing-doer written in Go.
Stars: ✭ 6,070 (+26291.3%)
Mutual labels: ci
Toast
Containerize your development and continuous integration environments. 🥂
Stars: ✭ 748 (+3152.17%)
Mutual labels: ci
Abstruse
Abstruse is a free and open-source CI/CD platform that tests your models and code.
Stars: ✭ 704 (+2960.87%)
Mutual labels: ci
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+27352.17%)
Mutual labels: ci
Modern Cpp Template
A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
Stars: ✭ 690 (+2900%)
Mutual labels: ci
Ultima
An open source, Infrastructure-as-Code cloud platform with built-in CI and local development environment.
Stars: ✭ 18 (-21.74%)
Mutual labels: ci
Shipjs
Take control of what is going to be your next release.
Stars: ✭ 668 (+2804.35%)
Mutual labels: ci
Orbital
Orbital is a self-hosted CI system for solo/small consulting dev teams. Written in Rust.
Stars: ✭ 22 (-4.35%)
Mutual labels: ci
Docker Jenkins
Jenkins with Blue Ocean and support for builiding jobs in Docker
Stars: ✭ 18 (-21.74%)
Mutual labels: ci
Salty Whales
Extra ordinary Docker images for Salt. Whales love Salt.
Stars: ✭ 5 (-78.26%)
Mutual labels: ci
gotesplit
gotesplit splits the testng in Go into a subset and run it
Usage
% gotesplit [options] [pkgs...] [-- go-test-arguments...]
Options
-total uint
total number of test splits (CIRCLE_NODE_TOTAL is used if set) (default 1)
-index uint
zero-based index number of test splits (CIRCLE_NODE_INDEX is used if set) (default 0)
-junit-dir
directory to store test result as a JUnit format (optional)
Synopsis
% gotesplit -total=10 -index=0 -- -v -short
go test -v -short -run ^(?:TestAA|TestBB)$
Description
The gotesplit splits the testng in Go into a subset and run it.
It is very useful when you want to run tests in parallel in a CI environment.
Installation
# Install the latest version. (Install it into ./bin/ by default).
% curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/main/install.sh | sh -s
# Specify installation directory ($(go env GOPATH)/bin/) and version.
% curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/main/install.sh | sh -s -- -b $(go env GOPATH)/bin [vX.Y.Z]
# In alpine linux (as it does not come with curl by default)
% wget -O - -q https://raw.githubusercontent.com/Songmu/gotesplit/main/install.sh | sh -s [vX.Y.Z]
# go get
% go get github.com/Songmu/gotesplit/cmd/gotesplit
Example
CircleCI
We don't need to specify the -total and -index flag on CircleCI because gotesplit reads the CIRCLE_NODE_TOTAL
and CIRCLE_NODE_INDEX
environment variables automatically.
parallelism: 5
docker:
- image: circleci/golang:1.15.3
steps:
- checkout
- run:
command: |
curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/main/install.sh | sh -s
bin/gotesplit ./... -- -v
GitHub Actions
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
parallelism: [3]
index: [0,1,2]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- name: Run tests parallelly
run: |
curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/main/install.sh | sh -s
bin/gotesplit -total ${{ matrix.parallelism }} -index ${{ matrix.index }} ./... -- -v
Author
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].