Skip to content

Commit

Permalink
Merge pull request #26 from make-software/develop
Browse files Browse the repository at this point in the history
Milestone #1: Reputation Contract
  • Loading branch information
zie1ony authored Mar 15, 2022
2 parents 4edcbc9 + 4e8e668 commit 9ae7ae4
Show file tree
Hide file tree
Showing 49 changed files with 5,206 additions and 1 deletion.
95 changes: 95 additions & 0 deletions .github/workflows/ci-casper-js-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: ci-casper-js-client
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- master
- develop
paths-ignore:
- "**.md"
pull_request:
branches:
- master
- develop
- feature/*
paths-ignore:
- "**.md"

env:
NODE_ENV: ci
WASM_RELEASE_PATH: ${{ github.workspace }}/target/wasm32-unknown-unknown/release
NCTL_USERS_FOLDER_PATH: /tmp/net-1/users
CHAIN_NAME: casper-net-1
NODE_ADDRESS: http://localhost:11101/rpc
EVENT_STREAM_ADDRESS: http://localhost:18101/events/main
INSTALL_PAYMENT_AMOUNT: 200000000000
DEPLOY_PAYMENT_AMOUNT: 200000000000

jobs:
run-e2e:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
casper-nctl:
# Docker Hub image
image: makesoftware/casper-nctl:v144-220303
options: --name casper-nctl # -v ${{ github.workspace }}/assets:/home/casper/casper-node/utils/nctl/assets
env:
PREDEFINED_ACCOUNTS: 'true'
MINIMUM_ROUND_EXPONENT: '12'
MAXIMUM_ROUND_EXPONENT: '13'
DEPLOY_DELAY: '2sec'
ports:
# Opens RPC, REST and events ports on the host and service container
- 11101:11101
- 14101:14101
- 18101:18101
volumes:
- /tmp:/home/casper/casper-node/utils/nctl/assets
steps:
- name: Fix keys permission
run: sudo chown runner $NCTL_USERS_FOLDER_PATH/*/*

- name: Checkout
uses: actions/checkout@v2

- name: Cache Build Wasm
id: wasm-cache
uses: actions/cache@v1
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
path: |
/home/runner/.cargo/bin
/home/runner/.cargo/git
/home/runner/.cargo/registry/cache
/home/runner/.cargo/registry/index
target
- name: Build Wasm
if: steps.wasm-cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
- run: sudo apt update && sudo apt install -y build-essential && sudo apt-get install wabt
if: steps.wasm-cache.outputs.cache-hit != 'true'
- run: make prepare
if: steps.wasm-cache.outputs.cache-hit != 'true'
- run: make build-contracts
if: steps.wasm-cache.outputs.cache-hit != 'true'

- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Npm Install
run: cd client && npm install

- name: E2E Test Report - Reputation Contract Client
run: cd client && NODE_ENV=ci npm run e2e:reputation
32 changes: 32 additions & 0 deletions .github/workflows/ci-casper-rust-contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ci-casper-rust-contract

on:
push:
branches:
- master
- develop
paths-ignore:
- "**.md"

pull_request:
branches:
- master
- develop
- feature/*
paths-ignore:
- "**.md"

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
- run: sudo apt update && sudo apt install -y build-essential
- run: make prepare
- run: make check-lint
- run: make test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
tests/wasm/*.wasm
Loading

0 comments on commit 9ae7ae4

Please sign in to comment.