From 86c2857b2dcd9708a4753ca553c8e3294f1a0336 Mon Sep 17 00:00:00 2001 From: Radostina Lyubomirova Date: Wed, 4 Jun 2025 12:39:15 +0300 Subject: [PATCH] testttttttt --- .github/workflows/ci-test.yml | 36 +++++++++++++++++++++++++++++++++++ hardhat/hardhat.config.js | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-test.yml diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000000..0a6ebc64b4 --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,36 @@ +name: Test Against Deployed Devnet + +on: + workflow_dispatch: + +jobs: + test_contracts: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Pull devnet-with-contracts image + run: docker pull ghcr.io/${{ github.repository_owner }}/go-ethereum:devnet-with-contracts + + - name: Start devnet-with-contracts container + run: | + docker run -d --name geth-devnet-test -p 8545:8545 \ + ghcr.io/${{ github.repository_owner }}/go-ethereum:devnet-with-contracts \ + geth --http --http.addr 0.0.0.0 --http.port 8545 --http.api eth,net,web3 --dev + + - name: Wait for Geth RPC to be ready + run: | + for i in {1..10}; do + curl -s http://localhost:8545 && break + echo "Waiting for Geth RPC..." && sleep 3 + done + + - name: Install Hardhat dependencies + working-directory: hardhat + run: npm install + + - name: Run Hardhat tests against devnet-with-contracts + working-directory: hardhat + run: npx hardhat test --network localhost \ No newline at end of file diff --git a/hardhat/hardhat.config.js b/hardhat/hardhat.config.js index b5fcf87a2f..2ab9128bbd 100644 --- a/hardhat/hardhat.config.js +++ b/hardhat/hardhat.config.js @@ -8,4 +8,4 @@ module.exports = { }, }, solidity: "0.8.18", -}; +}; \ No newline at end of file