Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Diefenbach authored Aug 22, 2019
2 parents 1049922 + 1030a0f commit fb9fdd4
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 536 deletions.
63 changes: 25 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PR_branches_only: &PR_branches_only
ignore:
- /^\d+\.\d+.*/


################################################################################
# #
# Custom Executor definitions. #
Expand Down Expand Up @@ -67,17 +68,6 @@ commands:
# CI Setup Commands #
# ================= #

setup-job:
description: |
Attach the workspace and load ENV variables.
Additionally skips the job this is used in, if the commit message is invalid
(unless the workflow executing the job is running on "master" or "dev").
steps:
- attach_workspace:
at: "/home/circleci"
- export_env_vars
- skip_bad_commit_format

export_env_vars:
description: Export ENV variables used by our script.
steps:
Expand Down Expand Up @@ -124,12 +114,12 @@ commands:
make install-dev
skip_bad_commit_format:
validate_commit_format:
description: Validate the first line of the commit message against a REGEX.
steps:
- run:
name: Validate the commit's title description.
command: python3 ${CI_SCRIPTS_DIR}/skip-on-bad-commit-message.py
command: python3 ${CI_SCRIPTS_DIR}/validate-commit-message.py

# ================================== #
# Linter and test execution commands #
Expand Down Expand Up @@ -181,6 +171,14 @@ commands:

jobs:

validate-commit-message:
executor: default-executor
steps:
- attach_workspace:
at: "/home/circleci"
- export_env_vars
- validate_commit_format

prep-system:
executor: default-executor
steps:
Expand All @@ -194,22 +192,11 @@ jobs:

# Run all test suites (aka the test harness) of the repository and lint-check
# our code base.
test-harness:
executor: default-executor
steps:
- setup-job
- run_test_harness

style-check-and-lint:
executor: default-executor
steps:
- setup-job
- lint_codebase

lint-and-test:
executor: default-executor
steps:
- setup-job
- attach_workspace:
at: "/home/circleci"
- lint_codebase
- run_test_harness

Expand All @@ -218,7 +205,9 @@ jobs:
bump-versions:
executor: default-executor
steps:
- setup-job
- attach_workspace:
at: "/home/circleci"
- export_env_vars
- run:
name: Add Github to known hosts.
command: |
Expand All @@ -238,8 +227,6 @@ jobs:
executor: default-executor
steps:
- checkout
- export_env_vars
- skip_bad_commit_format
- run:
name: Publish to pypi using flit.
command: |
Expand Down Expand Up @@ -271,32 +258,31 @@ workflows:
- prep-system:
<<: *PR_branches_only

- test-harness:
context: Raiden-SP-Context
requires:
- prep-system

- style-check-and-lint:
- lint-and-test:
context: Raiden-SP-Context
requires:
- prep-system

- finalize:
requires:
- prep-system
- style-check-and-lint
- test-harness
- lint-and-test

Merge-Commit-Workflow:
jobs:
- prep-system:
<<: *master_dev_only

- validate-commit-message:
context: Raiden-SP-Context
requires:
- prep-system

# Run linters and test harnesses against PR branches.
- lint-and-test:
context: Raiden-SP-Context
requires:
- prep-system
- validate-commit-message

# Bump the minor or patch for `master` on each merge commit.
- bump-versions:
Expand All @@ -316,6 +302,7 @@ workflows:
- finalize:
requires:
- prep-system
- validate-commit-message
- lint-and-test
- bump-versions
- tear-down
Expand Down
7 changes: 0 additions & 7 deletions .circleci/scripts/skip-on-bad-commit-message.py

This file was deleted.

4 changes: 0 additions & 4 deletions .circleci/scripts/validate-commit-message.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
print(f"Validating commit message {COMMIT_MSG!r}")
print(f"Parsed commit type: {COMMIT_TYPE}")

if CURRENT_BRANCH not in ("master", "dev"):
# This workflow is executed on a PR - we skip validation for these.
exit(0)

if not COMMIT_TYPE:
# The commit message title does not comply with any of our regexes.
print("No commit type parsed - the commit message does not comply with the required pattern!")
Expand Down
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@
ARG PY_VERSION=3.7
FROM python:$PY_VERSION AS cache

RUN pip install raiden
# Clone raiden repo and switch to its `develop` branch
RUN git clone https://github.com/raiden-network/raiden /raiden
RUN git --git-dir /raiden/.git checkout develop

# Install raiden's development dependencies.
RUN pip install -r /raiden/requirements/requirements-dev.txt

# Install the raiden package
RUN pip install ./raiden

FROM python:${PY_VERSION}

ARG PY_VERSION

# Copy raiden repository and site-packages from build cache
COPY --from=cache /raiden /raiden
COPY --from=cache /usr/local/lib/python${PY_VERSION}/dist-packages /usr/local/lib/python${PY_VERSION}/dist-packages

# Copy SP folder and install.
Expand Down
19 changes: 6 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
.. image:: https://codecov.io/gh/raiden-network/scenario-player/branch/master/graph/badge.svg
:alt: Code Coverage
:target: https://codecov.io/gh/raiden-network/scenario-player

.. image:: https://circleci.com/gh/raiden-network/scenario-player.svg?style=shield
:alt: CI Status
:target: https://circleci.com/gh/raiden-network/scenario-player

.. image:: https://img.shields.io/docker/cloud/build/raidennetwork/scenario-player
:alt: Docker Cloud
:target: https://cloud.docker.com/u/raidennetwork/repository/docker/raidennetwork/scenario-player/general

.. image:: https://img.shields.io/github/tag-date/raiden-network/scenario-player?label=STABLE
:alt: Releases
:target: https://github.com/raiden-network/scenario-player/releases

.. image:: https://img.shields.io/github/license/raiden-network/scenario-player
:alt: License
:target: https>//github.com/raiden-network/scenario-player

.. image:: https://img.shields.io/github/issues-raw/raiden-network/scenario-player/bug?color=red&label=Open%20Bugs
:alt: Open Bugs
:target: https://github.com/raiden-network/scenario-player/issues?q=is%3Aissue+is%3Aopen+label%3Abug

.. image:: https://img.shields.io/github/issues-raw/raiden-network/scenario-player/Feature request?color=orange&label=Open%20Feature%20Requests
:target: https://github.com/raiden-network/scenario-player/issues?q=is%3Aissue+is%3Aopen+label%3A%22Feature+request%22

.. image:: https://img.shields.io/github/tag-date/raiden-network/scenario-player?label=STABLE

.. image:: https://img.shields.io/github/tag/raiden-network/scenario-player?label=LATEST

######################
Raiden Scenario Player
######################

Expand Down
4 changes: 1 addition & 3 deletions examples/scenario-example-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ nodes:
## Options to apply to all nodes
## Option names correspond to Raiden cli options without the leading double dash (`--`)
default_options:
## Sets Raiden config parameters.
gas-price: fast
#environment-type: development
#flat-fee: 10
# environment-type: development
#registry-contract-address: "0xbfa863Ac58a3E0A82B58a8e958F2752Bfb573388"
#discovery-contract-address: "0xb2646EB8270a4de7451f6F7b259FdE17DBCeedc9"
#secret-registry-contract-address: "0xA5c882f09c3DE551d76dcDE08890fAa0dD1F29E3"
Expand Down
8 changes: 0 additions & 8 deletions scenario_player/exceptions/cli.py

This file was deleted.

8 changes: 0 additions & 8 deletions scenario_player/exceptions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ class ConfigurationError(ValueError):
"""Generic error thrown if there was an error while reading the scenario file."""


class UDCTokenConfigError(ConfigurationError):
"""Invalid Configuration parameters. Most likely there is an issue with Token amounts"""


class InsufficientMintingAmount(ConfigurationError):
"""The minted amount set in token.min_balance is not sufficient"""


class NodeConfigurationError(ConfigurationError):
"""An error occurred while validating the nodes setting of a scenario file."""

Expand Down
Loading

0 comments on commit fb9fdd4

Please sign in to comment.