Giter VIP home page Giter VIP logo

test_cluster_task's Introduction

Mix tasks to test and run on several nodes

Run tests in a distributed environment (cluster with several nodes).

The code is based on the distributed_test by Sam Schneider (credits!)

Usage

¡NB! empd must be started to use this functionality.

Use the default number of nodes (1 master + 4 slaves)

mix test.cluster

Use a specific number of nodes (1 master + n slaves). Note the master is not included in the count.

mix test.cluster --count 7

Setting up github action for CI

The project that uses test_cluster_task should have epmd started before running tests. This is a scaffold of how your GH Action might be configured (thanks to https://github.com/actions/setup-elixir)

name: Test

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
    strategy:
      matrix:
        otp: [21.3, 22.2]
        elixir: [1.9.4]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-elixir@v1
        with:
          otp-version: ${{matrix.otp}}
          elixir-version: ${{matrix.elixir}}
      - run: MIX_ENV=ci epmd -daemon
      - run: MIX_ENV=ci mix deps.get
      - run: MIX_ENV=ci mix test

Installation

If available in Hex, the package can be installed by adding test_cluster_task to your list of dependencies in mix.exs:

def deps do
  [{:test_cluster_task, "~> 0.3"}]
end

test_cluster_task's People

Contributors

am-kantox avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

test_cluster_task's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.