From 843e7316e78da1c0916bae14f38fa1ac45234421 Mon Sep 17 00:00:00 2001 From: ryo-casper Date: Tue, 9 Apr 2024 20:20:14 -0400 Subject: [PATCH] address ci feedback --- .github/workflows/ci-casper-client-sdk.yml | 63 ++++++++++++---------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci-casper-client-sdk.yml b/.github/workflows/ci-casper-client-sdk.yml index d78e1c672..5f4097c51 100644 --- a/.github/workflows/ci-casper-client-sdk.yml +++ b/.github/workflows/ci-casper-client-sdk.yml @@ -79,32 +79,37 @@ jobs: - name: Test build run: npm run build - # # test mainnet - # - name: Get the mainnet version - # id: get-mainnet-version - # run: echo "MAINNET_VERSION=$(curl -s -X POST --data-raw '${{ env.VERSION_QUERY }}' -H "Content-Type:application/json" ${{ env.MAINNET_NODE_URL }} | jq -r .result.build_version | cut -d "-" -f 1)" >> "$GITHUB_ENV" - - # - name: Test RPC - mainnet ${{ env.MAINNET_VERSION }} - # run: npx casper-node-launcher-js node v${{ env.MAINNET_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop - - # # test testnet - # - name: Get the testnet version - # id: get-testnet-version - # run: echo "TESTNET_VERSION=$(curl -s -X POST --data-raw '${{ env.VERSION_QUERY }}' -H "Content-Type:application/json" ${{ env.TESTNET_NODE_URL }} | jq -r .result.build_version | cut -d "-" -f 1)" >> "$GITHUB_ENV" - - # - name: Test RPC - testnet ${{ env.TESTNET_VERSION }} - # run: npx casper-node-launcher-js node v${{ env.TESTNET_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop - - # - name: Get Latest Casper-Node Tag Version - # run: | - # echo "CASPER_TAG_VERSION=$(curl -s ${{ env.GH_API_URL }} | jq -r '.[].name' | grep 'v*' | sort -V | sed 's/_$//' | tail -n1)" >> $GITHUB_ENV - # env: - # GH_API_URL: 'https://api.github.com/repos/casper-network/casper-node/tags' - - # - name: Test RPC - Casper Node - ${{ env.CASPER_TAG_VERSION }} - # # Runs action if the latest version is different from mainnet and testnet - # if: ${{ env.CASPER_TAG_VERSION }} != v${{ env.MAINNET_VERSION }} && ${{ env.CASPER_TAG_VERSION }} != v${{ env.TESTNET_VERSION }} - # run: npx casper-node-launcher-js node ${{ env.CASPER_TAG_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop - - # - name: Test RPC - Casper Node - DEV - # run: npx casper-node-launcher-js node dev --daemon && npm run test:e2e && npx casper-node-launcher-js stop + # test mainnet + - name: Get the mainnet version + if: ${{ false }} + id: get-mainnet-version + run: echo "MAINNET_VERSION=$(curl -s -X POST --data-raw '${{ env.VERSION_QUERY }}' -H "Content-Type:application/json" ${{ env.MAINNET_NODE_URL }} | jq -r .result.build_version | cut -d "-" -f 1)" >> "$GITHUB_ENV" + + - name: Test RPC - mainnet ${{ env.MAINNET_VERSION }} + run: npx casper-node-launcher-js node v${{ env.MAINNET_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop + + # test testnet + - name: Get the testnet version + if: ${{ false }} + id: get-testnet-version + run: echo "TESTNET_VERSION=$(curl -s -X POST --data-raw '${{ env.VERSION_QUERY }}' -H "Content-Type:application/json" ${{ env.TESTNET_NODE_URL }} | jq -r .result.build_version | cut -d "-" -f 1)" >> "$GITHUB_ENV" + + - name: Test RPC - testnet ${{ env.TESTNET_VERSION }} + if: ${{ false }} + run: npx casper-node-launcher-js node v${{ env.TESTNET_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop + + - name: Get Latest Casper-Node Tag Version + if: ${{ false }} + run: | + echo "CASPER_TAG_VERSION=$(curl -s ${{ env.GH_API_URL }} | jq -r '.[].name' | grep 'v*' | sort -V | sed 's/_$//' | tail -n1)" >> $GITHUB_ENV + env: + GH_API_URL: 'https://api.github.com/repos/casper-network/casper-node/tags' + + - name: Test RPC - Casper Node - ${{ env.CASPER_TAG_VERSION }} + # Runs action if the latest version is different from mainnet and testnet + if: ${{ false }} && ${{ env.CASPER_TAG_VERSION }} != v${{ env.MAINNET_VERSION }} && ${{ env.CASPER_TAG_VERSION }} != v${{ env.TESTNET_VERSION }} + run: npx casper-node-launcher-js node ${{ env.CASPER_TAG_VERSION }} --daemon && npm run test:e2e && npx casper-node-launcher-js stop + + - name: Test RPC - Casper Node - DEV + if: ${{ false }} + run: npx casper-node-launcher-js node dev --daemon && npm run test:e2e && npx casper-node-launcher-js stop