Skip to content

Commit

Permalink
Add tests and peripherals into the build.
Browse files Browse the repository at this point in the history
Having tests and peripherals in the build allows simply downloading the archived build artifact and having everything necessary to run integration tests.

Update node.yaml workflow for using only the build artifact.  It no longer needs to clone the eos-evm-node repository.
  • Loading branch information
oschwaldp-oci committed Aug 1, 2023
1 parent d2f4a57 commit 224b6e5
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,6 @@ jobs:
app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }}
private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }}

- name: Checkout EOS EVM Node Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
token: ${{ steps.auth.outputs.token }}
path: eos-evm-node

- name: Download EOS EVM Node builddir
uses: actions/download-artifact@v3
with:
Expand All @@ -216,18 +208,13 @@ jobs:
- name: Extract EOS EVM Node builddir
id: evm-node-build
run: |
pwd
ls
pushd eos-evm-node/peripherals/tx_wrapper
echo "EVM_NODE_TX_WRAPPER=$(pwd)" >> "$GITHUB_OUTPUT"
popd
mkdir eos-evm-node
mv build.tar.gz eos-evm-node/
cd eos-evm-node
ls
echo "EVM_NODE_ROOT=$(pwd)" >> "$GITHUB_OUTPUT"
pushd eos-evm-node
tar xvf build.tar.gz
cd build
pushd build
echo "EVM_NODE_BUILD=$(pwd)" >> "$GITHUB_OUTPUT"
popd
- name: Install Test Depedencies
run: |
Expand Down Expand Up @@ -259,13 +246,7 @@ jobs:
ls ${{ steps.evm-contract.outputs.EVM_CONTRACT }}
echo "See if build root still looks good."
ls ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}
echo "See if tx_wrapper still looks good."
ls ${{ steps.evm-node-build.outputs.EVM_NODE_TX_WRAPPER }}
echo "See if node root still looks good."
ls ${{ steps.evm-node-build.outputs.EVM_NODE_ROOT }}
echo "See if node root tests still looks good."
ls ${{ steps.evm-node-build.outputs.EVM_NODE_ROOT }}/tests
${{ steps.evm-node-build.outputs.EVM_NODE_ROOT }}/tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-tx-wrapper ${{ steps.evm-node-build.outputs.EVM_NODE_TX_WRAPPER }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-tx-wrapper ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/peripherals/tx_wrapper
- name: Prepare Logs
if: failure()
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ endif()
add_subdirectory(external)
add_subdirectory(version)
add_subdirectory(src)
add_subdirectory(peripherals)
add_subdirectory(tests)
1 change: 1 addition & 0 deletions peripherals/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory( tx_wrapper )
4 changes: 4 additions & 0 deletions peripherals/tx_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configure_file( index.js . COPYONLY )
configure_file( package-lock.json . COPYONLY )
configure_file( package.json . COPYONLY )
configure_file( yarn.lock . COPYONLY )
5 changes: 5 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_subdirectory( nodeos_eos_evm_server )

configure_file(antelope_name.py . COPYONLY)
configure_file(nodeos_eos_evm_server.py . COPYONLY)
configure_file(nodeos_eos_evm_test.py . COPYONLY)
7 changes: 7 additions & 0 deletions tests/nodeos_eos_evm_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_subdirectory( contracts )
add_subdirectory( scripts )

configure_file( extract-logtime-cmd.sh . COPYONLY )
configure_file( hardhat.config.js . COPYONLY )
configure_file( package.json . COPYONLY )
configure_file( yarn.lock . COPYONLY )
9 changes: 9 additions & 0 deletions tests/nodeos_eos_evm_server/contracts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
configure_file( BlockNum.sol . COPYONLY )
configure_file( Blockhash.sol . COPYONLY )
configure_file( CMakeLists.txt . COPYONLY )
configure_file( Eventor.sol . COPYONLY )
configure_file( Lock.sol . COPYONLY )
configure_file( Recursive.sol . COPYONLY )
configure_file( Storage.sol . COPYONLY )
configure_file( Token.sol . COPYONLY )
configure_file( WEOS.sol . COPYONLY )
7 changes: 7 additions & 0 deletions tests/nodeos_eos_evm_server/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
configure_file( deploy-blockhash.js . COPYONLY )
configure_file( deploy-blocknum.js . COPYONLY )
configure_file( deploy-eventor.js . COPYONLY )
configure_file( deploy-recursive.js . COPYONLY )
configure_file( deploy-token.js . COPYONLY )
configure_file( deploy-uniswap.js . COPYONLY )
configure_file( deploy.js . COPYONLY )

0 comments on commit 224b6e5

Please sign in to comment.