Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #27 from flywheel-io/ci
Browse files Browse the repository at this point in the history
Add CI target
  • Loading branch information
kofalt authored Mar 14, 2018
2 parents 889ff61 + 11ea6c3 commit 6cbb9cc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2

jobs:
build:
working_directory: "~/gears"

docker:
- image: python:2-alpine3.7

steps:
- checkout

- restore_cache:
key: gears-1-{{ checksum "setup.py"}}

- run:
name: Install Dependencies
command: pip install -e .

- save_cache:
key: gears-1-{{ checksum "setup.py"}}
paths:
- "~/.cache/pip"

- run:
name: Validate
command: python validate.py
8 changes: 0 additions & 8 deletions gears/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,3 @@ def validate_invocation(manifest, invocation):

inv_schema = derive_invocation_schema(manifest)
jsonschema.validate(invocation, inv_schema)


def test(): # Can become a test case later :)
x = load_json_from_file(os.path.join(get_project_dir(), "manifest.example.json"))
validate_manifest(x)

y = load_json_from_file(os.path.join(get_project_dir(), "invocation.example.json"))
validate_invocation(x, y)
2 changes: 2 additions & 0 deletions README.md → readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Flywheel Gears

[![Build status](https://circleci.com/gh/flywheel-io/gears/tree/master.svg?style=shield&circle-token=fa0c0bf6fa27a8548231fc12baff5f633ae201d8)](https://circleci.com/gh/flywheel-io/gears)

This repository holds the [gear specification](spec) as well as a Python library of [gear-related tools](gears).

#### Example Gear
Expand Down
7 changes: 7 additions & 0 deletions validate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import gears

x = gears.load_json_from_file("gears/manifest.example.json")
gears.validate_manifest(x)

y = gears.load_json_from_file("gears/invocation.example.json")
gears.validate_invocation(x, y)

0 comments on commit 6cbb9cc

Please sign in to comment.