Giter Site home page Giter Site logo

test-algo-action's Introduction

test-algo github action

A github action designed to test an algorithm on www.algorithmia.com, with a given input/expected output.

Action Input

inputs:
  regular_api_key:
    description: 'your typical Algorithmia API key'
    required: true
  api_address:
    description: 'The API address for the Algorithmia Cluster you wish to connect to'
    required: false
    default: 'https://api.algorithmia.com'
  algorithm_name:
    description: 'The name of the Algorithm you want to test'
    required: true
  cases:
    description: 'A list of Json Case objects that describe the desired test cases'
    required: True
  regular_api_key - (required) - An Algorithmia api key that has execute access for the algorithm you wish to test, read more about that [here](https://algorithmia.com/developers/platform/customizing-api-keys)
  api_address - (optional) - The Algorithmia API cluster address you wish to connect to, if using a private cluster; please provide the correct path to your environment.
  algorithm_name - (required) - The algorithmia algorithm name for project you're testing. This algorithm name must refer to the github repository you attach this action to in order to work properly.
  cases - (required) - a stringified json list containing test cases to try your algorithm with, if any of the test cases fails - this action will return with an exception indicating which case failed.

Case Schema

Your test cases should follow the following json schema

[
 { 
    "case_name": String,
    "input": Any,
    "expected_output": Any
  },
  ...
]

input and expected_output will be expected to be the raw input/output that the algorithm you're testing should expect.

Example

name: Algorithmia test-algo

on:
  commit

jobs:
  test-algo:

    runs-on: ubuntu-latest
    - name: Algorithmia test-algo
      uses: algorithmiaio/[email protected]
      id: build-wait-step
      with:
        regular_api_key: {{ secrets.ALGORITHMIA_API_KEY }}
        api_address: {{ secrets.ALGORITHMIA_API_ADDRESS }}
        algorithm_name: your_username/your_algorithm
        cases: '[{"case_name":"hello test", "input":"test", "expected_output":"hello test"}]

test-algo-action's People

Contributors

zeryx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chilicyber

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.