-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM simonalphafang/artela-client:0.0.1 | ||
|
||
RUN git clone https://github.com/artela-network/aspect-tooling.git | ||
RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /aspect-tooling/packages/testcases && npm i && npm run contract:build" | ||
RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /aspect-tooling/packages/testcases && sh build.sh || true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ubuntu | ||
WORKDIR / | ||
RUN apt update && apt -y upgrade && apt -y install build-essential cmake libboost-all-dev curl git | ||
RUN git clone https://github.com/artela-network/artela-web3.js.git | ||
|
||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
|
||
RUN /bin/bash -c "source ~/.nvm/nvm.sh && nvm install v16.17.0" | ||
RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /artela-web3.js && npm i && npm run build" | ||
|
||
RUN git clone https://github.com/artela-network/artela-solidity.git && sed -i '705s/if (Expression const\* value = _return.expression())/if (_return.expression())/g' /artela-solidity/libsolidity/codegen/ir/IRGeneratorForStatements.cpp | ||
RUN cd /artela-solidity && cmake -B build . && make -j4 -C build && make -C build install | ||
|
||
RUN SOLC_PATH=$(which solc) && ASOLC_PATH=$(echo $SOLC_PATH | sed "s/solc/asolc/g") && ln -s $SOLC_PATH $ASOLC_PATH | ||
|
||
|
||
|
||
# RUN git clone https://github.com/artela-network/aspect-tooling.git | ||
# RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /aspect-tooling/packages/testcases && npm i && npm run contract:build" | ||
# RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /aspect-tooling/packages/testcases && sh build.sh || true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM simonalphafang/artela-client:0.0.1 | ||
|
||
RUN git clone -b feat-ci https://github.com/luketheart/test-scripts | ||
RUN /bin/bash -c "source ~/.nvm/nvm.sh && cd /test-scripts/pre_public_testnet/json-rpc && npm i" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: JsonRPC Test | ||
|
||
on: | ||
push: | ||
branches: [ ci_test ] | ||
pull_request: | ||
branches: [ ci_test ] | ||
|
||
jobs: | ||
jsonrpc-ci-call: | ||
uses: ./.github/workflows/reuseable-jsonrpc-test.yaml | ||
with: | ||
test_node_addr: "http://47.254.27.97:8545" | ||
test_script: "ci_call.cjs" | ||
key_privateKey: "0x8778bb32408d744cfc2c9da02499783b65d0261895acb3e27e0b4f63c07f9329" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Reusable JsonRPC Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
test_node_addr: | ||
required: true | ||
type: string | ||
test_script: | ||
required: true | ||
type: string | ||
key_privateKey: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Aspect Test | ||
run: | | ||
mkdir -p ci_scripts | ||
cat > ci_scripts/init_env.sh <<EOF | ||
source ~/.nvm/nvm.sh | ||
set -ex | ||
cd /test-scripts/pre_public_testnet/json-rpc | ||
sed -i "s|\"node\": \".*\"|\"node\": \"${{ inputs.test_node_addr }}\"|g" project.config.json && cat project.config.json | ||
echo '${{ inputs.key_privateKey }}' > privateKey.txt | ||
node ${{ inputs.test_script }} | ||
EOF | ||
chmod +x ci_scripts/init_env.sh | ||
docker run --name testenv -v $(pwd)/ci_scripts:/ci_scripts -i simonalphafang/artela-jsonrpc-testenv:0.0.1 /bin/bash -c /ci_scripts/init_env.sh |