All Projects → Songmu → Gotesplit

Songmu / Gotesplit

Licence: mit
Splits the testing in Go into a subset and run it. It is useful for the CI environment.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Gotesplit

Github Actions Golang
GitHub Actions as CI for Go
Stars: ✭ 672 (+2821.74%)
Mutual labels:  ci
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+31208.7%)
Mutual labels:  ci
Haiku
🚀 Instant Heroku deploys from GitHub branches
Stars: ✭ 17 (-26.09%)
Mutual labels:  ci
Ansible Role Jenkins
Ansible Role - Jenkins CI
Stars: ✭ 689 (+2895.65%)
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
Flutter engine build
Flutter Engine构建产物归档
Stars: ✭ 19 (-17.39%)
Mutual labels:  ci
Toast
Containerize your development and continuous integration environments. 🥂
Stars: ✭ 748 (+3152.17%)
Mutual labels:  ci
Azure Pipelines Template
template for your azure pipelines
Stars: ✭ 17 (-26.09%)
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
Taskcat
Test all the CloudFormation things! (with TaskCat)
Stars: ✭ 799 (+3373.91%)
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
Androidsdk
🐳 Full-fledged Android SDK Docker Image
Stars: ✭ 776 (+3273.91%)
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

Test Status MIT License PkgGoDev

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

Songmu

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].