Skip to content

Commit 9ae7ae4

Browse files
authored
Merge pull request #26 from make-software/develop
Milestone #1: Reputation Contract
2 parents 4edcbc9 + 4e8e668 commit 9ae7ae4

49 files changed

Lines changed: 5206 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: ci-casper-js-client
2+
on:
3+
# Allows you to run this workflow manually from the Actions tab
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
paths-ignore:
10+
- "**.md"
11+
pull_request:
12+
branches:
13+
- master
14+
- develop
15+
- feature/*
16+
paths-ignore:
17+
- "**.md"
18+
19+
env:
20+
NODE_ENV: ci
21+
WASM_RELEASE_PATH: ${{ github.workspace }}/target/wasm32-unknown-unknown/release
22+
NCTL_USERS_FOLDER_PATH: /tmp/net-1/users
23+
CHAIN_NAME: casper-net-1
24+
NODE_ADDRESS: http://localhost:11101/rpc
25+
EVENT_STREAM_ADDRESS: http://localhost:18101/events/main
26+
INSTALL_PAYMENT_AMOUNT: 200000000000
27+
DEPLOY_PAYMENT_AMOUNT: 200000000000
28+
29+
jobs:
30+
run-e2e:
31+
# The type of runner that the job will run on
32+
runs-on: ubuntu-latest
33+
# Service containers to run with `runner-job`
34+
services:
35+
# Label used to access the service container
36+
casper-nctl:
37+
# Docker Hub image
38+
image: makesoftware/casper-nctl:v144-220303
39+
options: --name casper-nctl # -v ${{ github.workspace }}/assets:/home/casper/casper-node/utils/nctl/assets
40+
env:
41+
PREDEFINED_ACCOUNTS: 'true'
42+
MINIMUM_ROUND_EXPONENT: '12'
43+
MAXIMUM_ROUND_EXPONENT: '13'
44+
DEPLOY_DELAY: '2sec'
45+
ports:
46+
# Opens RPC, REST and events ports on the host and service container
47+
- 11101:11101
48+
- 14101:14101
49+
- 18101:18101
50+
volumes:
51+
- /tmp:/home/casper/casper-node/utils/nctl/assets
52+
steps:
53+
- name: Fix keys permission
54+
run: sudo chown runner $NCTL_USERS_FOLDER_PATH/*/*
55+
56+
- name: Checkout
57+
uses: actions/checkout@v2
58+
59+
- name: Cache Build Wasm
60+
id: wasm-cache
61+
uses: actions/cache@v1
62+
with:
63+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
64+
restore-keys: ${{ runner.os }}-cargo-
65+
path: |
66+
/home/runner/.cargo/bin
67+
/home/runner/.cargo/git
68+
/home/runner/.cargo/registry/cache
69+
/home/runner/.cargo/registry/index
70+
target
71+
72+
- name: Build Wasm
73+
if: steps.wasm-cache.outputs.cache-hit != 'true'
74+
uses: actions-rs/toolchain@v1
75+
with:
76+
toolchain: stable
77+
profile: minimal
78+
components: rustfmt, clippy
79+
- run: sudo apt update && sudo apt install -y build-essential && sudo apt-get install wabt
80+
if: steps.wasm-cache.outputs.cache-hit != 'true'
81+
- run: make prepare
82+
if: steps.wasm-cache.outputs.cache-hit != 'true'
83+
- run: make build-contracts
84+
if: steps.wasm-cache.outputs.cache-hit != 'true'
85+
86+
- name: Setup NodeJS
87+
uses: actions/setup-node@v2
88+
with:
89+
node-version: "14"
90+
91+
- name: Npm Install
92+
run: cd client && npm install
93+
94+
- name: E2E Test Report - Reputation Contract Client
95+
run: cd client && NODE_ENV=ci npm run e2e:reputation
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: ci-casper-rust-contract
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
paths-ignore:
9+
- "**.md"
10+
11+
pull_request:
12+
branches:
13+
- master
14+
- develop
15+
- feature/*
16+
paths-ignore:
17+
- "**.md"
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-20.04
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions-rs/toolchain@v1
26+
with:
27+
profile: minimal
28+
components: rustfmt, clippy
29+
- run: sudo apt update && sudo apt install -y build-essential
30+
- run: make prepare
31+
- run: make check-lint
32+
- run: make test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
tests/wasm/*.wasm

0 commit comments

Comments
 (0)