Skip to content

Commit

Permalink
Batch Solidity Equivalence Tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nana Essilfie-Conduah <[email protected]>
  • Loading branch information
Nana-EC committed Oct 17, 2023
1 parent b7f9d1e commit 4efecac
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 19 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/solidity-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Solidity Equivalence Tests CI
name: Solidity Equivalence Tests

on:
workflow_call:
workflow_dispatch:
inputs:
filterTagOverride:
description: 'The Test filter tag to use for overrides'
required: false
type: string

concurrency:
group: tests-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -13,18 +18,41 @@ permissions:
pull-requests: write

jobs:
SolidityEquivalence:
name: BlockInfo Test Suite
CustomFilterTagTest:
if: ${{ inputs.filterTagOverride != ''}}
name: ${{ inputs.filterTagOverride }} Tests
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: '@solidityequiv'
testfilter: ${{ inputs.filterTagOverride }}

SolidityEquivalence1:
if: ${{ inputs.filterTagOverride == ''}}
name: Solidity Equivalence Suite 1
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: '@solidityequiv1'

SolidityEquivalence2:
if: ${{ inputs.filterTagOverride == ''}}
name: Solidity Equivalence Suite 2
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: '@solidityequiv2'

SolidityEquivalence3:
if: ${{ inputs.filterTagOverride == ''}}
name: Solidity Equivalence Suite 3
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: '@solidityequiv3'

PublishResults:
name: Publish Results
if: ${{ !cancelled() }}
needs:
- BlockInfo
- SolidityEquivalence1
- SolidityEquivalence2
- SolidityEquivalence3

runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Start the local node
run: npx hedera start -d --network local
timeout-minutes: 5
Expand Down
2 changes: 1 addition & 1 deletion test/solidity/concatenation/concatenation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { expect } = require('chai')
const { ethers } = require('hardhat')
const Constants = require('../../constants')

describe('Concatenation', function () {
describe('@solidityequiv2 Concatenation', function () {
let signers;
let contract;
const first = 'first';
Expand Down
2 changes: 1 addition & 1 deletion test/solidity/cryptomath/CryptoMath.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { expect } = require('chai')
const { ethers } = require('hardhat')
const Constants = require('../../constants')

describe('@solidityevmequiv CryptoMath Test Suite', function () {
describe('@solidityevmequiv1 CryptoMath Test Suite', function () {
let cryptoMathContract, provider, signers;


Expand Down
2 changes: 1 addition & 1 deletion test/solidity/encoding/Encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const { expect } = require("chai");
const { ethers } = require("hardhat");

describe("@solidityevmequiv Encoding", function() {
describe("@solidityevmequiv1 Encoding", function() {
let encodingContract, receiver, sender;

const addressData = "0x1234567890123456789012345678901234567890";
Expand Down
2 changes: 1 addition & 1 deletion test/solidity/errors/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { expect, assert } = require('chai')
const { ethers } = require('hardhat')
const Constants = require('../../constants')

describe('Solidity Errors', function () {
describe('@solidityequiv2 Solidity Errors', function () {
let signers
let contract

Expand Down
2 changes: 1 addition & 1 deletion test/solidity/new/New.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { expect } = require('chai')
const { ethers } = require('hardhat')
const Constants = require('../../constants')

describe('New tests', () => {
describe('@solidityequiv1 New tests', () => {
let newContract
const CONTRACT_ALPHA = 'Alpha'
const MESSAGE_ALPHA = 'Message from Alpha contract'
Expand Down
2 changes: 1 addition & 1 deletion test/solidity/transaction/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { ethers } = require('hardhat')
const Constants = require('../../constants')
const Utils = require('../../hts-precompile/utils')

describe('Transaction tests', function () {
describe('@solidityequiv1 Transaction tests', function () {
let contractTr, contractTrAddr, wallet, mfContract, senderWalletAddr

before(async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/solidity/units/cryptoUnits.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { expect } = require('chai')
const { ethers } = require('hardhat')
const { WEI, GWEI } = require('../../constants')

describe('Crypto Units tests', function () {
describe('@solidityequiv3 Crypto Units tests', function () {
let signers
let contract

Expand Down
2 changes: 1 addition & 1 deletion test/solidity/units/timeUnits.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { expect } = require('chai')
const { ethers } = require('hardhat')
const { SECOND, MINUTE, HOUR, DAY, WEEK } = require('../../constants')

describe('Time Units tests', function () {
describe('@solidityequiv3 Time Units tests', function () {
let signers
let contract

Expand Down

0 comments on commit 4efecac

Please sign in to comment.