-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(geth-test-ledger): add basic tests
- Add test suite for geth-test-ledger package. - Add new test suit to CI - It was initially proposed in #2588, I've added some cleanups and improvements. Closes: #2579 Co-authored-by: Tomasz Awramski <[email protected]> Signed-off-by: Michal Bajer <[email protected]>
- Loading branch information
Showing
7 changed files
with
542 additions
and
13 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 |
---|---|---|
|
@@ -1545,6 +1545,31 @@ jobs: | |
node-version: ${{ env.NODEJS_VERSION }} | ||
- uses: actions/[email protected] | ||
|
||
- id: yarn-cache | ||
name: Restore Yarn Cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} | ||
path: ./.yarn/ | ||
restore-keys: | | ||
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} | ||
- run: ./tools/ci.sh | ||
cactus-test-geth-ledger: | ||
continue-on-error: false | ||
env: | ||
FULL_BUILD_DISABLED: true | ||
JEST_TEST_PATTERN: packages/cactus-test-geth-ledger/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts | ||
JEST_TEST_RUNNER_DISABLED: false | ||
TAPE_TEST_RUNNER_DISABLED: true | ||
needs: build-dev | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Use Node.js ${{ env.NODEJS_VERSION }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ env.NODEJS_VERSION }} | ||
- uses: actions/[email protected] | ||
|
||
- id: yarn-cache | ||
name: Restore Yarn Cache | ||
uses: actions/[email protected] | ||
|
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
409 changes: 409 additions & 0 deletions
409
packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.json
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.sol
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,24 @@ | ||
// ***************************************************************************** | ||
// IMPORTANT: If you update this code then make sure to recompile | ||
// it and update the .json file as well so that they | ||
// remain in sync for consistent test executions. | ||
// With that said, there shouldn't be any reason to recompile this, like ever... | ||
// ***************************************************************************** | ||
|
||
pragma solidity >=0.7.0; | ||
|
||
contract HelloWorld { | ||
string private name = "CaptainCactus"; | ||
|
||
function sayHello() public pure returns (string memory) { | ||
return "Hello World!"; | ||
} | ||
|
||
function getName() public view returns (string memory) { | ||
return name; | ||
} | ||
|
||
function setName(string memory newName) public { | ||
name = newName; | ||
} | ||
} |
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
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