Skip to content
Merged

Dev #29

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
0ad0d09
update package author
traylewin Nov 24, 2018
0af6cbd
update standard token contract to be compatible with eos v1.5.0
surabhil Dec 5, 2018
f6b70d1
remove wasm and wast files
surabhil Dec 5, 2018
7f668a7
update instrument and rights contract
surabhil Dec 6, 2018
5c754bf
upgrade rights_registry contrcat to be compatible with EOS v1.5.0
surabhil Dec 6, 2018
983dc6e
use typedef to define multi-index
surabhil Dec 6, 2018
62b2898
remove wasm file
surabhil Dec 6, 2018
173e07c
remove commented out code
surabhil Dec 6, 2018
62c77bd
update ore.usagelog.cpp to be compatible with eos v1.5
surabhil Dec 7, 2018
edb77e1
use ACTION and TABLE macros
surabhil Dec 7, 2018
08b0075
use macros for tables and actions
surabhil Dec 7, 2018
fff731e
upgrade instrument contract to be compatible with eosv1.5
surabhil Dec 7, 2018
1f14ce1
add comments for instrument contract and delete dead code
surabhil Dec 7, 2018
6860321
create ore_util and move helper function to ore_utils
surabhil Dec 7, 2018
a2fbdb6
add comments to the rights registry contract
surabhil Dec 8, 2018
1bc6dcd
update ore.instrument contract to use c_str() to convert string to nu…
surabhil Dec 8, 2018
0c3d34a
remove utils as we dont need the string to char method and can use .c…
surabhil Dec 8, 2018
8385ed9
use TABLE and ACTION macros
surabhil Dec 8, 2018
f7d564d
add comments and assert messages for usage log
surabhil Dec 8, 2018
e4dda82
remove checked in abi file
surabhil Dec 8, 2018
b4b4a30
ci added
Dec 10, 2018
3e4aa30
ci added
Dec 10, 2018
71c231f
ci added
Dec 10, 2018
7612a7f
ci added
Dec 10, 2018
6d43137
instrument update
Dec 10, 2018
76e65cf
instrument update
Dec 10, 2018
14d7cbb
instrument update
Dec 10, 2018
24db720
instrument update
Dec 10, 2018
b9e9b5b
Merge pull request #1 from API-market/feature/upgrade-standard-token-…
surabhil Dec 10, 2018
9f21b94
Merge pull request #3 from API-market/feature/upgrade-instrument-cont…
surabhil Dec 10, 2018
606679b
Merge pull request #4 from API-market/feature/upgrade-standard-token-…
surabhil Dec 10, 2018
ab51f96
eosio.cdt added
Dec 11, 2018
2b2dd7f
update the object creation for rights registry
surabhil Dec 11, 2018
7db0baa
intialise rights registry within the scope of rights.ore
surabhil Dec 11, 2018
362e186
instrument updates
Dec 11, 2018
a72753f
instrument updates
Dec 11, 2018
6f6bc5c
instrument test updates
Dec 11, 2018
2122bc0
instrument test updates
Dec 11, 2018
5db51a9
repo clean
Dec 11, 2018
3c752d9
update instrument update action to use deferred transaction to update…
surabhil Dec 11, 2018
3d21934
Merge pull request #6 from API-market/feature/update-instrument-updat…
surabhil Dec 11, 2018
cf8f2f8
test updates
Dec 11, 2018
9898697
test updates
Dec 11, 2018
edc0f88
right registry update
Dec 11, 2018
178efd5
instrument test update
Dec 11, 2018
f1b98b6
Merge pull request #8 from API-market/feature/update-instrument-updat…
surabhil Dec 11, 2018
1b238ea
Add cancel deferred transaction in the checkRight instrument if minte…
Jan 4, 2019
d874246
Merge pull request #23 from API-market/108-cancel-deffered-fix
surabhil Jan 22, 2019
349ec8c
Revert "Merge pull request #23 from API-market/108-cancel-deffered-fix"
surabhil Jan 22, 2019
c4e2933
Merge branch 'dev' into 108-cancel-deffered-fix
surabhil Jan 22, 2019
dd0fa28
Merge pull request #25 from API-market/108-cancel-deffered-fix
surabhil Jan 22, 2019
996e864
rebase contracts
surabhil Jan 22, 2019
a3e74bc
add latest version of contracts
surabhil Jan 22, 2019
2ecd692
Merge branch 'master' into dev
surabhil Jan 22, 2019
92b4dab
intr test update
Jan 22, 2019
6474710
intr test update
Jan 22, 2019
af5c18e
intr test update
Jan 22, 2019
0d89982
Merge branch 'dev' into ci-test-integration
surabhil Jan 22, 2019
e4cebfb
Merge pull request #28 from API-market/ci-test-integration
surabhil Jan 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
ARG eos_branch=v1.3.1
ARG eos_symbol=SYS

FROM tokenika/eosio:v1.5.0

############## PYTHON #############################################################################################
## Based mostly on https://github.com/docker-library/python/blob/005dda958/3.5/jessie/Dockerfile
ARG python_version=3.5.6

ENV PATH /usr/local/bin:$PATH

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV TERM xterm

RUN set -ex \
\
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${python_version%%[a-z]*}/Python-$python_version.tar.xz" \
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${python_version%%[a-z]*}/Python-$python_version.tar.xz.asc" \
&& mkdir -p /usr/src/python \
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
&& rm python.tar.xz \
\
&& cd /usr/src/python \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& ./configure \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
&& make install \
&& ldconfig \
\
&& find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' + \
&& rm -rf /usr/src/python \
\
&& python3 --version

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -s idle3 idle \
&& ln -s pydoc3 pydoc \
&& ln -s python3 python \
&& ln -s python3-config python-config

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 18.0

RUN set -ex; \
\
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
\
python get-pip.py \
--disable-pip-version-check \
--no-cache-dir \
"pip==$PYTHON_PIP_VERSION" \
; \
pip --version; \
\
find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' +; \
rm -f get-pip.py

RUN python -m pip install termcolor
############## EOS CDT #############################################################################################

RUN wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb && \
apt install ./eosio.cdt-1.4.1.x86_64.deb \
&& rm ./eosio.cdt-1.4.1.x86_64.deb

############## EOS FACTORY #############################################################################################

ARG eosfactory_branch=master
RUN git clone -b "$eosfactory_branch" https://github.com/tokenika/eosfactory.git /opt/eosfactory/
WORKDIR /opt/eosfactory/
RUN git branch
RUN git log -10 --oneline
RUN mkdir /opt/workspace
RUN apt-get update && apt-get install -y expect
RUN mkdir ~/eosio-wallet/
RUN /opt/eosfactory/tests/integration/expect_script.sh

# https://superuser.com/a/1253889/59009
RUN sed -i 's/mesg n || true/tty -s \&\& mesg n || true/g' /root/.profile
RUN chmod +x ./tests/unittest.sh

WORKDIR /opt/eosfactory/tests/

# bash loads .profile by default
ENTRYPOINT ["/bin/bash", "-l", "-c"]
54 changes: 22 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,42 @@
version: 2
jobs:
build:
working_directory: ~/ore-protocol
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.1

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo
- image: bcelebci/ore-protocol
environment:
PIPENV_VENV_IN_PROJECT: true

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

- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

# - restore_cache: # restores saved dependency cache if the Branch key template or requirements.txt files have not changed since the previous run
# key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
# - run:
# name: install dependencies
# command: |
# ./expect_script.sh
# sudo -H python3 -m pip install -e eosfactory/
# python3 eosfactory/eosfactory/install.py /opt/eos ~/testeos/contracts
# 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
# - save_cache: # special step to save dependency cache
# key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
# paths:
# - "venv"
- run:
name: run tests
command: |
. venv/bin/activate
python manage.py test
tests/build_and_test.sh
python3 tests/standard_token.py
python3 tests/rights_registry.py
python3 tests/instrument.py
python3 tests/usage_log.py

- store_artifacts:
path: test-reports
destination: test-reports

destination: test-reports
Loading