From 8325d8886d30de260055ec212dd51efbbc77370a Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 11:06:18 +0800 Subject: [PATCH 1/8] Add workflow for testing evm rpc --- .github/workflows/tests-evm-rpc.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/tests-evm-rpc.yaml diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml new file mode 100644 index 0000000000..1a71025e0c --- /dev/null +++ b/.github/workflows/tests-evm-rpc.yaml @@ -0,0 +1,25 @@ +name: tests evm rpc +on: + pull_request: + types: [ labeled ] + +# env: + # ETHLIBS_TEST_ROPSTEN_WS_URL: "" + +jobs: + unit-tests: + if: ${{ github.event.label.name == 'test/rpc_evm' }} + name: Unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: '^1.17.0' + - uses: actions/checkout@v3 + with: + repository: 'DeFiCh/go-ethlibs' + - name: go version + run: go version + - name: Run unit tests + run: go test -v ./node/rpc_test.go + From 927b3bf6deee6713d9ced5463b7e94bbc0fa420b Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 15:57:48 +0800 Subject: [PATCH 2/8] Add test workflow for EVM RPCs --- .github/workflows/tests-evm-rpc.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index 1a71025e0c..a0a3aa04d3 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -1,11 +1,11 @@ -name: tests evm rpc +name: rpc auth tests on: pull_request: types: [ labeled ] - -# env: - # ETHLIBS_TEST_ROPSTEN_WS_URL: "" - +env: + ETHLIBS_TEST_WS_URL: wss://goerli.infura.io/ws/v3/ + AUTH_ID: ${{ secrets.INFURE_GOERLI_PROJECT_ID }} + AUTH_PASS: ${{ secrets.INFURA_GOERLI_API_KEY }} jobs: unit-tests: if: ${{ github.event.label.name == 'test/rpc_evm' }} @@ -18,8 +18,5 @@ jobs: - uses: actions/checkout@v3 with: repository: 'DeFiCh/go-ethlibs' - - name: go version - run: go version - name: Run unit tests run: go test -v ./node/rpc_test.go - From 92f677acbdcd54c51cae3e46111d37f871d4dfdd Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 16:05:27 +0800 Subject: [PATCH 3/8] Rename EVM RPC Test --- .github/workflows/tests-evm-rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index a0a3aa04d3..60c9bd33fc 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -1,4 +1,4 @@ -name: rpc auth tests +name: RPC EVM Tests on: pull_request: types: [ labeled ] From f1e143ac6bc3f1c2a3fe342dcdd05b802cecd6f5 Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 16:07:30 +0800 Subject: [PATCH 4/8] Rename tests --- .github/workflows/tests-evm-rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index 60c9bd33fc..ba99b3973b 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -1,4 +1,4 @@ -name: RPC EVM Tests +name: Tests - EVM/RPC Tests on: pull_request: types: [ labeled ] From a2bcd5a0a77b1911e3ac22e967ae03dffa60fca4 Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 16:10:04 +0800 Subject: [PATCH 5/8] Rename workflow job --- .github/workflows/tests-evm-rpc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index ba99b3973b..8349d7f7ef 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -1,4 +1,4 @@ -name: Tests - EVM/RPC Tests +name: Tests - EVM on: pull_request: types: [ labeled ] @@ -7,7 +7,7 @@ env: AUTH_ID: ${{ secrets.INFURE_GOERLI_PROJECT_ID }} AUTH_PASS: ${{ secrets.INFURA_GOERLI_API_KEY }} jobs: - unit-tests: + node-rpc-tests: if: ${{ github.event.label.name == 'test/rpc_evm' }} name: Unit tests runs-on: ubuntu-latest From d8344a12ae9dbeede269bdae1c354d4473a70830 Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 15 Mar 2023 16:13:27 +0800 Subject: [PATCH 6/8] Fix typo on environment var on CI --- .github/workflows/tests-evm-rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index 8349d7f7ef..3634dd3cbc 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -4,7 +4,7 @@ on: types: [ labeled ] env: ETHLIBS_TEST_WS_URL: wss://goerli.infura.io/ws/v3/ - AUTH_ID: ${{ secrets.INFURE_GOERLI_PROJECT_ID }} + AUTH_ID: ${{ secrets.INFURA_GOERLI_PROJECT_ID }} AUTH_PASS: ${{ secrets.INFURA_GOERLI_API_KEY }} jobs: node-rpc-tests: From f135eea202e632f66b024d3c2a032ec253135c43 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 17 Mar 2023 11:20:18 +0800 Subject: [PATCH 7/8] Rename tag 'test/rpc_evm' to 'evm' --- .github/workflows/tests-evm-rpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index 3634dd3cbc..4d5cb7ee9e 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -8,7 +8,7 @@ env: AUTH_PASS: ${{ secrets.INFURA_GOERLI_API_KEY }} jobs: node-rpc-tests: - if: ${{ github.event.label.name == 'test/rpc_evm' }} + if: ${{ github.event.label.name == 'evm' }} name: Unit tests runs-on: ubuntu-latest steps: From 5459322ba42a3668fced644dc654d02a59a49c1d Mon Sep 17 00:00:00 2001 From: dcorral Date: Wed, 26 Apr 2023 11:43:15 +0200 Subject: [PATCH 8/8] Set NODE_URL to point devnet --- .github/workflows/tests-evm-rpc.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-evm-rpc.yaml b/.github/workflows/tests-evm-rpc.yaml index 4d5cb7ee9e..b94afa4e4d 100644 --- a/.github/workflows/tests-evm-rpc.yaml +++ b/.github/workflows/tests-evm-rpc.yaml @@ -1,15 +1,13 @@ name: Tests - EVM on: - pull_request: - types: [ labeled ] + workflow_dispatch: env: - ETHLIBS_TEST_WS_URL: wss://goerli.infura.io/ws/v3/ + NODE_URL: "http://35.187.53.161:20551/" AUTH_ID: ${{ secrets.INFURA_GOERLI_PROJECT_ID }} AUTH_PASS: ${{ secrets.INFURA_GOERLI_API_KEY }} jobs: node-rpc-tests: - if: ${{ github.event.label.name == 'evm' }} - name: Unit tests + name: E2E tests runs-on: ubuntu-latest steps: - uses: actions/setup-go@v3 @@ -18,5 +16,5 @@ jobs: - uses: actions/checkout@v3 with: repository: 'DeFiCh/go-ethlibs' - - name: Run unit tests + - name: Run e2e tests run: go test -v ./node/rpc_test.go