add circleci config
This commit is contained in:
parent
839590b5f4
commit
f41caa713b
|
@ -0,0 +1,46 @@
|
|||
# Python CircleCI 2.0 configuration file
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
working_directory: ~/repo
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "requirements.txt" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v1-dependencies-
|
||||
|
||||
- run:
|
||||
name: install dependencies
|
||||
command: |
|
||||
python3 -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
- run:
|
||||
name: build phase0 spec
|
||||
command: make build/phase0
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- ./venv
|
||||
key: v1-dependencies-{{ checksum "requirements.txt" }}
|
||||
|
||||
# run tests!
|
||||
# this example uses Django's built-in test-runner
|
||||
# other common Python testing frameworks include pytest and nose
|
||||
# https://pytest.org
|
||||
# https://nose.readthedocs.io
|
||||
- run:
|
||||
name: run tests
|
||||
command: |
|
||||
. venv/bin/activate
|
||||
pytest tests
|
||||
|
||||
- store_artifacts:
|
||||
path: test-reports
|
||||
destination: test-reports
|
|
@ -2,3 +2,5 @@
|
|||
/__pycache__
|
||||
/venv
|
||||
/.pytest_cache
|
||||
|
||||
build/phase0/spec.py
|
||||
|
|
4
Makefile
4
Makefile
|
@ -2,10 +2,8 @@ SPEC_DIR = ./specs
|
|||
SCRIPT_DIR = ./scripts
|
||||
BUILD_DIR = ./build
|
||||
|
||||
.PHONY: clean all
|
||||
.PHONY: clean all $(BUILD_DIR)/phase0
|
||||
|
||||
|
||||
$(BUILD_DIR)/phase0:
|
||||
mkdir -p $@
|
||||
python3 $(SCRIPT_DIR)/phase0/build_spec.py $(SPEC_DIR)/core/0_beacon-chain.md $@/spec.py
|
||||
touch $(BUILD_DIR)/__init__.py $(BUILD_DIR)/phase0/__init__.py
|
||||
|
|
Loading…
Reference in New Issue