Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
381da73
persistence service introduced
gleb-urvanov Aug 11, 2020
bf7870d
liter errors fixed
gleb-urvanov Aug 11, 2020
c3ad693
Merge branch 'iznik' into feature/lowdb-persistence
gleb-urvanov Aug 11, 2020
e691b12
linter error fixed, conflicting rules disabled
gleb-urvanov Aug 11, 2020
cba607f
Merge branch 'account-info-rename' of https://github.com/Lezek123/sub…
gleb-urvanov Aug 12, 2020
65b7f95
altered object creation to match new api
gleb-urvanov Aug 13, 2020
c5bdc41
merged joystream-types-register-missing
gleb-urvanov Aug 13, 2020
90d6778
Merge branch 'joystream-types-register-missing' of https://github.com…
gleb-urvanov Aug 13, 2020
a89bd8b
altering code to match new api
gleb-urvanov Aug 13, 2020
7e56ad1
merged substrate_version_upgrade
gleb-urvanov Aug 13, 2020
f64e5c0
made tests working with new API
gleb-urvanov Aug 17, 2020
2b48b7d
prettier changes applied
gleb-urvanov Aug 17, 2020
8eca0cc
package.json change reverted
gleb-urvanov Aug 17, 2020
0888bae
code cleaning
gleb-urvanov Aug 17, 2020
a2ae706
members and council scenarion fixes
gleb-urvanov Aug 17, 2020
1b492d4
verbose fixture arguments
gleb-urvanov Aug 17, 2020
dd20619
verbose result functions for fixtures
gleb-urvanov Aug 17, 2020
031a0c0
merged iznik
gleb-urvanov Aug 18, 2020
a1c9fff
lockfile updated
gleb-urvanov Aug 18, 2020
efd6ffd
prettier errors fixed
gleb-urvanov Aug 18, 2020
0a00e6f
git actions added to run the tests
gleb-urvanov Aug 21, 2020
1e14caa
moved test runner to separate workflow triggered by label
gleb-urvanov Aug 21, 2020
0364c8e
commit to trigger the workflow
gleb-urvanov Aug 21, 2020
e8ef4fb
commit to test branch where workflow is triggered
gleb-urvanov Aug 21, 2020
5e14813
altered trigger condition
gleb-urvanov Aug 21, 2020
0b1eafd
debug output removed, manual dispatch added
gleb-urvanov Aug 21, 2020
2306aa9
added execution rights to create chainspec script
gleb-urvanov Aug 21, 2020
ac3a655
job condition modified
gleb-urvanov Aug 21, 2020
ac956fc
condition altered, debug added
gleb-urvanov Aug 21, 2020
e2ca117
added version for debug
gleb-urvanov Aug 21, 2020
cf8ae46
set proper version for debug
gleb-urvanov Aug 21, 2020
48bd1da
workflow fixed
gleb-urvanov Aug 21, 2020
668f7bb
run condition altered
gleb-urvanov Aug 21, 2020
817a541
removed debug output
gleb-urvanov Aug 21, 2020
b2f97f4
merged iznik
gleb-urvanov Aug 21, 2020
86f354d
log output fixed
gleb-urvanov Aug 22, 2020
e079377
merged iznik
gleb-urvanov Aug 31, 2020
b0c90ab
resolve json module option added
gleb-urvanov Aug 31, 2020
f8a1dad
removed separate dockerfile for tesing, added testing export data
gleb-urvanov Sep 2, 2020
4da98e4
Merge branch 'chainspec-import-members-forum-versioned-store' of http…
gleb-urvanov Sep 2, 2020
040e90a
added playbook for testing with exported state
gleb-urvanov Sep 2, 2020
1593bab
changed playbook for testing workflow
gleb-urvanov Sep 2, 2020
d27fc14
chainspec renamed
gleb-urvanov Sep 2, 2020
55a1f1e
worker payout test fixed
gleb-urvanov Sep 3, 2020
c0ad2d1
returned upgrade runtime to the testset
gleb-urvanov Sep 3, 2020
45b395c
duration increased
gleb-urvanov Sep 3, 2020
1906f30
runtime upgrade temporary removed
gleb-urvanov Sep 3, 2020
c13d573
added console output for ci flow
gleb-urvanov Sep 4, 2020
d4c9a9b
worker payout fixed
gleb-urvanov Sep 4, 2020
8288e51
merged iznik
gleb-urvanov Sep 7, 2020
5772cf5
altered path to augment types
gleb-urvanov Sep 7, 2020
c04f3ee
linter fixed
gleb-urvanov Sep 7, 2020
7b1d49c
yarn.lock updated
gleb-urvanov Sep 8, 2020
3cb5be7
typo fixed
gleb-urvanov Sep 8, 2020
f43bb36
nonce clearing for transaction expected to failure added
gleb-urvanov Sep 8, 2020
38845e7
reverted nonce changes
gleb-urvanov Sep 9, 2020
8c6761f
Merge branch 'iznik' into feature/devops-update
gleb-urvanov Sep 9, 2020
8c641e1
removed docker-compose dependency for testing purposes
gleb-urvanov Sep 9, 2020
9cf9c97
typo fixed
gleb-urvanov Sep 9, 2020
6e0b505
reward relationship for leader issue fixed
gleb-urvanov Sep 9, 2020
59fc8d0
Bug/worker payout (#9)
gleb-urvanov Sep 10, 2020
f643c0e
chainspec and runtime upgrade removal (#11)
gleb-urvanov Sep 10, 2020
4c2c0d6
Execution time improvement (#14)
gleb-urvanov Sep 11, 2020
70bf5e8
added execute permission for new script
gleb-urvanov Sep 11, 2020
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
25 changes: 25 additions & 0 deletions .github/workflows/run-network-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: run-network-tests
on:
pull_request:
types: [labeled]
workflow_dispatch:

jobs:
run_ansible_tests:
if: github.event.label.name == 'run-network-tests' || github.event.action == null
name: run network tests using ansible
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install toolchain
run: curl https://getsubstrate.io -sSf | bash -s -- --fast
- name: ansible build and tests
run: |
cd ./devops/ansible
ansible-playbook -i hosts build-and-run-tests-single-node-playbook.yml --become -v
22 changes: 22 additions & 0 deletions devops/ansible/build-and-run-tests-exported-chainspec-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- hosts: 127.0.0.1
user: root
become: yes
become_method: sudo

tasks:

- name: install dependencies
include_role:
name: install_dependencies

- name: alter block creation time
include_role:
name: alter_block_creation_time

- name: build node
include_role:
name: build_docker_image

- name: run tests
include_role:
name: run_tests_exported_chainspec
7 changes: 6 additions & 1 deletion devops/ansible/build-and-run-tests-single-node-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
become_method: sudo

tasks:

- name: install dependencies
include_role:
name: install_dependencies

- name: alter block creation time
include_role:
name: alter_block_creation_time

- name: build node
include_role:
name: build_docker_image

- name: run tests
include_role:
name: run_tests_single_node
7 changes: 6 additions & 1 deletion devops/ansible/build-and-run-tests-two-nodes-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
become_method: sudo

tasks:

- name: install dependencies
include_role:
name: install_dependencies

- name: alter block creation time
include_role:
name: alter_block_creation_time

- name: build node
include_role:
name: build_docker_image

- name: run tests
include_role:
name: run_tests_two_nodes
7 changes: 6 additions & 1 deletion devops/ansible/build-image-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
become_method: sudo

tasks:

- name: install dependencies
include_role:
name: install_dependencies

- name: alter block creation time
include_role:
name: alter_block_creation_time

- name: build node
include_role:
name: build_docker_image
name: build_docker_image
4 changes: 2 additions & 2 deletions devops/ansible/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
node_alice:
image: joystream/node-testing
container_name: alice
entrypoint: ./node --chain=chainspec.json --alice --validator --ws-external --rpc-cors=all
entrypoint: ./node --dev --alice --validator --unsafe-ws-external --rpc-cors=all
ports:
- "30333:30333"
- "9933:9933"
Expand All @@ -15,7 +15,7 @@ services:
node_bob:
image: joystream/node-testing
container_name: bob
entrypoint: ./node --chain=chainspec.json --bob --ws-external --rpc-cors=all
entrypoint: ./node --dev --bob --validator --unsafe-ws-external --rpc-cors=all
ports:
- "30335:30333"
- "9935:9933"
Expand Down
4 changes: 4 additions & 0 deletions devops/ansible/roles/alter_block_creation_time/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: alter block creation time
shell: ./scripts/alter-block-creation-time.sh
args:
chdir: ../../
2 changes: 1 addition & 1 deletion devops/ansible/roles/build_docker_image/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: create testing node docker image
shell: ./scripts/build-joystream-testing-node-docker-image.sh
shell: ./scripts/build-joystream-node-docker-image.sh
args:
chdir: ../../
21 changes: 16 additions & 5 deletions devops/ansible/roles/install_dependencies/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
- name: install pip on Debian
- name: install pip and npm on Debian
block:
- name: create temporary folder
file:
path: ../../.tmp
state: directory
- name: install pip using apt
apt: name=python-pip state=present
- name: install npm using apt
apt: name=npm state=present
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: install pip on Mac
Expand All @@ -11,15 +17,15 @@
path: ../../.tmp
state: directory
- name: get pip installer using curl
get_url:
get_url:
url: https://bootstrap.pypa.io/get-pip.py
dest: ../../.tmp/get-pip.py
- name: install pip
shell: python ../../.tmp/get-pip.py
when: ansible_distribution == 'MacOSX'
always:
always:
- name: remove pip installer script
file:
file:
path: ../../.tmp/get-pip.py
state: absent

Expand All @@ -31,5 +37,10 @@
name: yarn
global: yes

- name: Install pyrsistent
pip:
name: pyrsistent==0.16.0

- name: Install docker compose
pip: name=docker-compose
pip:
name: docker-compose==1.26.2
38 changes: 38 additions & 0 deletions devops/ansible/roles/run_tests_exported_chainspec/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- name: run network
block:
- name: yarn install for joystream types
shell: yarn workspace @joystream/types install

- name: yarn build for joystream types
shell: yarn workspace @joystream/types build

- name: yarn install for network tests
shell: yarn workspace joystream-testing install

- name: run docker container
docker_container:
name: "joystream-node"
image: "joystream/node"
ports:
- "9944:9944"
mounts:
- target: /testnet-state
source: "{{ playbook_dir }}/../../testnets/nicaea-exported-state"
type: bind
read_only: yes
entrypoint: ./node --chain ../testnet-state/raw_chain_spec.json --alice --validator --unsafe-ws-external --rpc-cors=all
state: started

- name: execute network tests
shell: yarn test >> ../../.tmp/tests.log
args:
chdir: ../../tests/network-tests/

always:
- name: display tests log
shell: cat ../../.tmp/tests.log

- name: stop docker container
docker_container:
name: "joystream-node-testing"
state: absent
21 changes: 16 additions & 5 deletions devops/ansible/roles/run_tests_single_node/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
- name: run network
block:
- name: yarn install for joystream types
shell: yarn workspace @joystream/types install

- name: yarn build for joystream types
shell: yarn workspace @joystream/types build

- name: yarn install for network tests
shell: yarn workspace joystream-testing install

- name: run docker container
docker_container:
name: "joystream-node-testing"
image: "joystream/node-testing"
name: "joystream-node"
image: "joystream/node"
ports:
- "9944:9944"
entrypoint: ./node --chain=chainspec.json --alice --validator --ws-external --rpc-cors=all
entrypoint: ./node --dev --alice --validator --unsafe-ws-external --rpc-cors=all
state: started

- name: execute network tests
shell: yarn debug >> ../../.tmp/tests.log
shell: yarn test >> ../../.tmp/tests.log
args:
chdir: ../../tests/network-tests/

always:
- name: display tests log
shell: cat ../../.tmp/tests.log

- name: stop docker container
docker_container:
name: "joystream-node-testing"
Expand Down
37 changes: 0 additions & 37 deletions devops/dockerfiles/ansible-node/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion devops/dockerfiles/rust-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ WORKDIR /setup
COPY setup.sh /setup
ENV TERM=xterm

RUN ./setup.sh
RUN ./setup.sh
4 changes: 4 additions & 0 deletions scripts/alter-block-creation-time.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

perl -i -pe's/pub const MILLISECS_PER_BLOCK: Moment = 6000;/pub const MILLISECS_PER_BLOCK: Moment = 2000;/' runtime/src/constants.rs
perl -i -pe's/pub const SLOT_DURATION: Moment = 6000;/pub const SLOT_DURATION: Moment = 2000;/' runtime/src/constants.rs
7 changes: 0 additions & 7 deletions scripts/build-joystream-testing-node-docker-image.sh

This file was deleted.

348,239 changes: 348,239 additions & 0 deletions testnets/nicaea-exported-state/chain_spec.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testnets/nicaea-exported-state/content.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testnets/nicaea-exported-state/forum.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testnets/nicaea-exported-state/members.json

Large diffs are not rendered by default.

Loading