From 97832fc088eccb93c152659367618ce1782a8b51 Mon Sep 17 00:00:00 2001 From: Davis Sawali Date: Mon, 24 Jun 2024 16:03:49 -0700 Subject: [PATCH] removed flextesa integration tests from workflow (#3001) * removed flextesa integration tests from workflow * updated estimates on tests * add informative comment to keep the existing sandbox tests --- .github/workflows/main.yml | 61 ------------------- .../contract/estimation-tests.spec.ts | 10 +-- .../flextesa/sandbox-ballot-operation.spec.ts | 5 ++ .../sandbox-drain-delegate-operation.spec.ts | 5 ++ 4 files changed, 15 insertions(+), 66 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 824320de53..dfd18969e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,64 +62,3 @@ jobs: env: # Ternary operator workaround TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && format('https://{0}.ecadinfra.com', matrix.testnet) || null }} - - integration-tests-flextesa: - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - include: - - protocol: Nairobi - testnet: nairobinet - testnet_uppercase: NAIROBINET - flextesa_docker_image: oxheadalpha/flextesa:20230607 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/hydrogen - - ## The 4 Bootstrap Accounts (alias, pk, pkh, sk) - # alice,edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn,tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb,unencrypted:edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq - # bob,edpkurPsQ8eUApnLUJ9ZPDvu98E8VNj4KtJa1aZr16Cr5ow5VHKnz4,tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6,unencrypted:edsk3RFfvaFaxbHx8BMtEW1rKQcPtDML3LXjNqMNLCzC3wLC1bWbAt - # charlie,edpkuvMuRuZ6ZbAquJH1XxBFfUmuBFz1zp9ENEqjCVgLp3NcY3Ww9M,tz1RDVcKmFcqzvTpJirvg4JaUVgZbjtnRT26,unencrypted:edsk3RgWvbKKA1atEUcaGwivge7QtckHkTL9nQJUXQKY5r8WKp4pF4 - # donald,edpkvXGp1BMZxHkwg3mKnWfJYS6HTJ5JtufD8YXxLtH8UKqLZkZVun,tz1eSWp4B9s1qhtNMMNXAkaf2oqCnDHd2iAm,unencrypted:edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2 - - name: Generate Flextesa bootstrap accounts - run: |- - echo "alice=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key alice)" >> $GITHUB_ENV - echo "bob=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key bob)" >> $GITHUB_ENV - echo "charlie=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key charlie)" >> $GITHUB_ENV - echo "donald=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key donald)" >> $GITHUB_ENV - - name: Provision Flextesa ${{ matrix.protocol }} container - run: |- - docker run \ - --rm \ - --name my-sandbox \ - --detach \ - -p 20000:20000 \ - ${{ matrix.flextesa_docker_image }} \ - flextesa mini-net \ - --root /tmp/mini-box --size 1 \ - --set-history-mode N000:archive \ - --number-of-b 1 \ - --balance-of-bootstrap-accounts tez:100_000_000 \ - --time-b 1 \ - --add-bootstrap-account="${alice}@2_000_000_000_000" \ - --add-bootstrap-account="${bob}@2_000_000_000_000" \ - --add-bootstrap-account="${charlie}@2_000_000_000_000" \ - --add-bootstrap-account="${donald}@2_000_000_000_000" \ - --no-daemons-for=donald \ - --until-level 200_000_000 \ - --protocol-kind ${{ matrix.protocol }} - - run: npm ci - - run: npm run build - - run: source ./integration-tests/sandbox-env.sh - - run: npm -w integration-tests run test:nairobinet-secret-key sandbox-ballot-operation.spec.ts - - run: npm -w integration-tests run test:nairobinet-secret-key sandbox-drain-delegate-operation.spec.ts - env: - RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true - SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq - TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000 - POLLING_INTERVAL_MILLISECONDS: 100 - RPC_CACHE_MILLISECONDS: 0 - TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb diff --git a/integration-tests/__tests__/contract/estimation-tests.spec.ts b/integration-tests/__tests__/contract/estimation-tests.spec.ts index 383f14ac40..d52fcaec73 100644 --- a/integration-tests/__tests__/contract/estimation-tests.spec.ts +++ b/integration-tests/__tests__/contract/estimation-tests.spec.ts @@ -95,14 +95,14 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { it('Verify .estimate.transfer for internal transfer to allocated implicit', async () => { const tx = contract.methods.do(MANAGER_LAMBDA.transferImplicit(knownBaker, 5)).toTransferParams(); const estimate = await LowAmountTez.estimate.transfer(tx); - expect(estimate.gasLimit).toEqual(1456); + expect(estimate.gasLimit).toEqual(1457); expect(estimate.storageLimit).toEqual(0); expect(estimate.suggestedFeeMutez).toEqual(394); expect(estimate.burnFeeMutez).toEqual(0); expect(estimate.minimalFeeMutez).toEqual(374); expect(estimate.totalCost).toEqual(374); expect(estimate.usingBaseFeeMutez).toEqual(374); - expect(estimate.consumedMilligas).toEqual(1455970); + expect(estimate.consumedMilligas).toEqual(1456142); }); it('Verify .estimate.transfer for multiple internal transfers to unallocated account', async () => { @@ -119,7 +119,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(445); expect(estimate.totalCost).toEqual(133945); expect(estimate.usingBaseFeeMutez).toEqual(445); - expect(estimate.consumedMilligas).toEqual(1570499); + expect(estimate.consumedMilligas).toEqual(1570671); }); it('Verify .estimate.transfer for internal origination', async () => { @@ -132,7 +132,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(421); expect(estimate.totalCost).toEqual(84671); expect(estimate.usingBaseFeeMutez).toEqual(421); - expect(estimate.consumedMilligas).toEqual(1866594); + expect(estimate.consumedMilligas).toEqual(1866766); }); it('Verify .estimate.transfer for multiple internal originations', async () => { @@ -145,7 +145,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(539); expect(estimate.totalCost).toEqual(164039); expect(estimate.usingBaseFeeMutez).toEqual(539); - expect(estimate.consumedMilligas).toEqual(2391747); + expect(estimate.consumedMilligas).toEqual(2391919); // Do the actual operation const op2 = await contract.methods.do(originate2()).send(); await op2.confirmation(); diff --git a/integration-tests/__tests__/flextesa/sandbox-ballot-operation.spec.ts b/integration-tests/__tests__/flextesa/sandbox-ballot-operation.spec.ts index 60c33177b0..30e469917b 100644 --- a/integration-tests/__tests__/flextesa/sandbox-ballot-operation.spec.ts +++ b/integration-tests/__tests__/flextesa/sandbox-ballot-operation.spec.ts @@ -1,3 +1,8 @@ +/** + * This test is not being run by any runner, + * will keep for future reference if an alternative sandbox is available + */ + import { VotingPeriodBlockResult } from '@taquito/rpc'; import { InMemorySigner } from '@taquito/signer'; import { TezosToolkit } from '@taquito/taquito'; diff --git a/integration-tests/__tests__/flextesa/sandbox-drain-delegate-operation.spec.ts b/integration-tests/__tests__/flextesa/sandbox-drain-delegate-operation.spec.ts index 277c5f6e24..ae46c94696 100644 --- a/integration-tests/__tests__/flextesa/sandbox-drain-delegate-operation.spec.ts +++ b/integration-tests/__tests__/flextesa/sandbox-drain-delegate-operation.spec.ts @@ -1,3 +1,8 @@ +/** + * This test is not being run by any runner, + * will keep for future reference if an alternative sandbox is available + */ + import { TezosToolkit } from "@taquito/taquito"; import { CONFIGS, sleep, isSandbox } from "../../config";