From e48df3c2d8cc09e10362799153c2221924394b1b Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 11:44:56 -0700 Subject: [PATCH 1/5] shorten main from feature pr merge tests --- .github/actions/determine_workflow_config/action.yml | 2 +- .../test/end_to_end/http_server/large_files/test/auto_tests.ts | 3 ++- .../end_to_end/http_server/large_files/test/huge_file_tests.ts | 3 ++- .../end_to_end/http_server/large_files/test/manual_tests.ts | 3 ++- .../test/end_to_end/http_server/large_files/test/tests.ts | 3 ++- .../property/candid_rpc/canister_methods/update/test/test.ts | 3 ++- .../test/property/candid_rpc/recursive/test/test.ts | 3 ++- .../property/candid_rpc/canister_methods/update/test/test.ts | 3 ++- .../stable/test/property/candid_rpc/recursive/test/test.ts | 3 ++- examples/stable/test/property/candid_rpc/service/test/test.ts | 3 ++- examples/stable/test/property/ic_api/chunk/test/tests.ts | 3 ++- 11 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/actions/determine_workflow_config/action.yml b/.github/actions/determine_workflow_config/action.yml index aef7a6dd1a..204199781e 100644 --- a/.github/actions/determine_workflow_config/action.yml +++ b/.github/actions/determine_workflow_config/action.yml @@ -60,7 +60,7 @@ runs: echo "is-dependabot=false" >> $GITHUB_OUTPUT else EXCLUDE_SLOW=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' }} - EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' }} + EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} echo "exclude-slow=$EXCLUDE_SLOW" >> $GITHUB_OUTPUT diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts index d0826c20af..3c96359db2 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts @@ -19,7 +19,8 @@ const autoGenAutoUploadSmallFileInfos: [number, Unit][] = [ const autoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? autoGenAutoUploadSmallFileInfos : [ ...autoGenAutoUploadSmallFileInfos, diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts index 69fd05adc1..dbd0a63d08 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts @@ -11,7 +11,8 @@ const hugeAutoGenAutoUploadSmallFileInfos: [number, Unit][] = [[0, 'GiB']]; // T const hugeAutoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? hugeAutoGenAutoUploadSmallFileInfos : [...hugeAutoGenAutoUploadSmallFileInfos, [2, 'GiB']]; // TODO add tests for 5GiB and maybe larger https://github.com/demergent-labs/azle/issues/2065 diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts index 45338313db..fdc2a62d86 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts @@ -10,7 +10,8 @@ import { getAutoGeneratedFileName, verifyUpload } from './tests'; export function manualTests(origin: string): Test { const manualFileSize = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? 7 : 150; const autoGenManualUploadFileInfos: [number, Unit][] = [ diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts index bfcd77a955..0a7d139f10 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts @@ -19,7 +19,8 @@ export function getTests(canisterId: string): Test { const origin = `http://${canisterId}.localhost:8000`; const describeLongTest = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? describe.skip : describe; diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts index 677b82a281..2c9666e4c1 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -34,7 +34,8 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts index d3600b2a68..5cbbfa51c0 100644 --- a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts @@ -48,7 +48,8 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts index 9a5903f302..73baa3b9a3 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -34,7 +34,8 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/recursive/test/test.ts b/examples/stable/test/property/candid_rpc/recursive/test/test.ts index de7b7deabb..064795a815 100644 --- a/examples/stable/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/stable/test/property/candid_rpc/recursive/test/test.ts @@ -48,7 +48,8 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/service/test/test.ts b/examples/stable/test/property/candid_rpc/service/test/test.ts index 5aadc6d689..526555b1d4 100644 --- a/examples/stable/test/property/candid_rpc/service/test/test.ts +++ b/examples/stable/test/property/candid_rpc/service/test/test.ts @@ -35,7 +35,8 @@ const AllServicesQueryMethodArb = QueryMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? shortArrayConstraints : { ...defaultArrayConstraints, diff --git a/examples/stable/test/property/ic_api/chunk/test/tests.ts b/examples/stable/test/property/ic_api/chunk/test/tests.ts index 7201886cd8..d8adbdc49d 100644 --- a/examples/stable/test/property/ic_api/chunk/test/tests.ts +++ b/examples/stable/test/property/ic_api/chunk/test/tests.ts @@ -11,7 +11,8 @@ import { _SERVICE as Actor } from './dfx_generated/canister/canister.did'; const max = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || - process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' + process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || + process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' ? 80 : 200; From 6cdec86f50f2e12bb89c05256535dcb7644c041a Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 11:56:25 -0700 Subject: [PATCH 2/5] make variable name more consistent with other main branch var --- .github/actions/determine_workflow_config/action.yml | 4 ++-- .github/actions/determine_workflow_context/README.md | 2 +- .github/actions/determine_workflow_context/action.yml | 8 ++++---- .github/workflows/run_test.yml | 10 +++++----- .../http_server/large_files/test/auto_tests.ts | 2 +- .../http_server/large_files/test/huge_file_tests.ts | 2 +- .../http_server/large_files/test/manual_tests.ts | 2 +- .../end_to_end/http_server/large_files/test/tests.ts | 2 +- .../candid_rpc/canister_methods/update/test/test.ts | 2 +- .../test/property/candid_rpc/recursive/test/test.ts | 2 +- .../candid_rpc/canister_methods/update/test/test.ts | 2 +- .../test/property/candid_rpc/recursive/test/test.ts | 2 +- .../test/property/candid_rpc/service/test/test.ts | 2 +- .../stable/test/property/ic_api/chunk/test/tests.ts | 2 +- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/actions/determine_workflow_config/action.yml b/.github/actions/determine_workflow_config/action.yml index 204199781e..1403910b43 100644 --- a/.github/actions/determine_workflow_config/action.yml +++ b/.github/actions/determine_workflow_config/action.yml @@ -60,8 +60,8 @@ runs: echo "is-dependabot=false" >> $GITHUB_OUTPUT else EXCLUDE_SLOW=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' }} - EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} - EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }} + EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push_from_feature_merge == 'true' }} + EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push_from_feature_merge == 'true' }} echo "exclude-slow=$EXCLUDE_SLOW" >> $GITHUB_OUTPUT echo "exclude-unstable=$EXCLUDE_UNSTABLE" >> $GITHUB_OUTPUT diff --git a/.github/actions/determine_workflow_context/README.md b/.github/actions/determine_workflow_context/README.md index 6e3b90d485..6dd7f93442 100644 --- a/.github/actions/determine_workflow_context/README.md +++ b/.github/actions/determine_workflow_context/README.md @@ -9,7 +9,7 @@ steps: - name: Use run conditions run: | - echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push }}" + echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" echo "Is main branch merge from release push: ${{ steps.workflow-context.outputs.is_main_branch_merge_from_release_push }}" echo "Is release branch PR: ${{ steps.workflow-context.outputs.is_release_branch_pr }}" echo "Is feature branch PR: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}" diff --git a/.github/actions/determine_workflow_context/action.yml b/.github/actions/determine_workflow_context/action.yml index aceb05a6ad..445c3f6056 100644 --- a/.github/actions/determine_workflow_context/action.yml +++ b/.github/actions/determine_workflow_context/action.yml @@ -1,9 +1,9 @@ name: 'Determine workflow context' description: 'Determines the workflow context based on the current GitHub context' outputs: - is_main_branch_push: + is_main_branch_push_from_feature_merge: description: 'True if this is a push to the main branch (excluding merges from release branches)' - value: ${{ steps.workflow-context.outputs.is_main_branch_push }} + value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} is_main_branch_push_from_release_merge: description: 'True if this is a push to the main branch from a release branch merge' value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} @@ -22,14 +22,14 @@ runs: - id: workflow-context run: | # Define conditions using shell variables - AZLE_IS_MAIN_BRANCH_PUSH=${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'demergent-labs/release--') }} + AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE=${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'demergent-labs/release--') }} AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE=${{ github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'demergent-labs/release--') }} AZLE_IS_RELEASE_BRANCH_PR=${{ startsWith(github.head_ref, 'release--') }} AZLE_IS_FEATURE_BRANCH_PR=${{ !startsWith(github.head_ref, 'release--') && github.ref != 'refs/heads/main' && github.event.pull_request.draft == false }} AZLE_IS_FEATURE_BRANCH_DRAFT_PR=${{ !startsWith(github.head_ref, 'release--') && github.ref != 'refs/heads/main' && github.event.pull_request.draft == true }} # Set individual outputs - echo "is_main_branch_push=$AZLE_IS_MAIN_BRANCH_PUSH" >> $GITHUB_OUTPUT + echo "is_main_branch_push_from_feature_merge=$AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE" >> $GITHUB_OUTPUT echo "is_main_branch_push_from_release_merge=$AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE" >> $GITHUB_OUTPUT echo "is_release_branch_pr=$AZLE_IS_RELEASE_BRANCH_PR" >> $GITHUB_OUTPUT echo "is_feature_branch_pr=$AZLE_IS_FEATURE_BRANCH_PR" >> $GITHUB_OUTPUT diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 74c7942fe9..66efccd660 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -53,7 +53,7 @@ jobs: ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }} AZLE_IDENTITY_STORAGE_MODE: 'plaintext' AZLE_END_TO_END_TEST_LINK_AZLE: ${{ matrix.azle_source == 'repo' }} - AZLE_IS_MAIN_BRANCH_PUSH: '' + AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE: '' AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE: '' AZLE_IS_RELEASE_BRANCH_PR: '' AZLE_IS_FEATURE_BRANCH_PR: '' @@ -75,7 +75,7 @@ jobs: - name: Set condition environment variables run: | - echo "AZLE_IS_MAIN_BRANCH_PUSH=${{ steps.set-conditions.outputs.is_main_branch_push }}" >> $GITHUB_ENV + echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE=${{ steps.set-conditions.outputs.is_main_branch_push_from_feature_merge }}" >> $GITHUB_ENV echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE=${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" >> $GITHUB_ENV echo "AZLE_IS_RELEASE_BRANCH_PR=${{ steps.set-conditions.outputs.is_release_branch_pr }}" >> $GITHUB_ENV echo "AZLE_IS_FEATURE_BRANCH_PR=${{ steps.set-conditions.outputs.is_feature_branch_pr }}" >> $GITHUB_ENV @@ -83,7 +83,7 @@ jobs: - name: Print environment variables run: | - echo "AZLE_IS_MAIN_BRANCH_PUSH: $AZLE_IS_MAIN_BRANCH_PUSH" + echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE: $AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE" echo "AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE: $AZLE_IS_MAIN_BRANCH_PUSH_FROM_RELEASE_MERGE" echo "AZLE_IS_RELEASE_BRANCH_PR: $AZLE_IS_RELEASE_BRANCH_PR" echo "AZLE_IS_FEATURE_BRANCH_PR: $AZLE_IS_FEATURE_BRANCH_PR" @@ -124,7 +124,7 @@ jobs: run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 @@ -133,7 +133,7 @@ jobs: run: | RUNS=1 - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push }}" == "true" ]]; then + if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then RUNS=100 fi diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts index 3c96359db2..b7fd8e29be 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/auto_tests.ts @@ -20,7 +20,7 @@ const autoGenAutoUploadSmallFileInfos: [number, Unit][] = [ const autoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? autoGenAutoUploadSmallFileInfos : [ ...autoGenAutoUploadSmallFileInfos, diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts index dbd0a63d08..4dc2d94482 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/huge_file_tests.ts @@ -12,7 +12,7 @@ const hugeAutoGenAutoUploadSmallFileInfos: [number, Unit][] = [[0, 'GiB']]; // T const hugeAutoGenAutoUploadFileInfos: [number, Unit][] = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? hugeAutoGenAutoUploadSmallFileInfos : [...hugeAutoGenAutoUploadSmallFileInfos, [2, 'GiB']]; // TODO add tests for 5GiB and maybe larger https://github.com/demergent-labs/azle/issues/2065 diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts index fdc2a62d86..06e58bc883 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/manual_tests.ts @@ -11,7 +11,7 @@ export function manualTests(origin: string): Test { const manualFileSize = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? 7 : 150; const autoGenManualUploadFileInfos: [number, Unit][] = [ diff --git a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts index 0a7d139f10..0ae9279d29 100644 --- a/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts +++ b/examples/experimental/test/end_to_end/http_server/large_files/test/tests.ts @@ -20,7 +20,7 @@ export function getTests(canisterId: string): Test { const describeLongTest = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? describe.skip : describe; diff --git a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts index 2c9666e4c1..88974a4032 100644 --- a/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -35,7 +35,7 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts index 5cbbfa51c0..496768412e 100644 --- a/examples/experimental/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/experimental/test/property/candid_rpc/recursive/test/test.ts @@ -49,7 +49,7 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts index 73baa3b9a3..0248825206 100644 --- a/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts +++ b/examples/stable/test/property/candid_rpc/canister_methods/update/test/test.ts @@ -35,7 +35,7 @@ const HeterogeneousUpdateMethodArb = UpdateMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/recursive/test/test.ts b/examples/stable/test/property/candid_rpc/recursive/test/test.ts index 064795a815..24b79384af 100644 --- a/examples/stable/test/property/candid_rpc/recursive/test/test.ts +++ b/examples/stable/test/property/candid_rpc/recursive/test/test.ts @@ -49,7 +49,7 @@ const AllRecursiveQueryMethodArb = fc.oneof( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : defaultArrayConstraints; diff --git a/examples/stable/test/property/candid_rpc/service/test/test.ts b/examples/stable/test/property/candid_rpc/service/test/test.ts index 526555b1d4..0576a972df 100644 --- a/examples/stable/test/property/candid_rpc/service/test/test.ts +++ b/examples/stable/test/property/candid_rpc/service/test/test.ts @@ -36,7 +36,7 @@ const AllServicesQueryMethodArb = QueryMethodArb( const arrayConstraints = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? shortArrayConstraints : { ...defaultArrayConstraints, diff --git a/examples/stable/test/property/ic_api/chunk/test/tests.ts b/examples/stable/test/property/ic_api/chunk/test/tests.ts index d8adbdc49d..74376fe259 100644 --- a/examples/stable/test/property/ic_api/chunk/test/tests.ts +++ b/examples/stable/test/property/ic_api/chunk/test/tests.ts @@ -12,7 +12,7 @@ import { _SERVICE as Actor } from './dfx_generated/canister/canister.did'; const max = process.env.AZLE_IS_FEATURE_BRANCH_PR === 'true' || process.env.AZLE_IS_FEATURE_BRANCH_DRAFT_PR === 'true' || - process.env.AZLE_IS_MAIN_BRANCH_PUSH === 'true' + process.env.AZLE_IS_MAIN_BRANCH_PUSH_FROM_FEATURE_MERGE === 'true' ? 80 : 200; From 86e1fc938348c2ccc89dddbebe00dd65e4ca381e Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 12:04:22 -0700 Subject: [PATCH 3/5] fixes --- .github/actions/determine_workflow_context/README.md | 4 ++-- .github/workflows/run_test.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/determine_workflow_context/README.md b/.github/actions/determine_workflow_context/README.md index 6dd7f93442..9a0f9822e9 100644 --- a/.github/actions/determine_workflow_context/README.md +++ b/.github/actions/determine_workflow_context/README.md @@ -9,8 +9,8 @@ steps: - name: Use run conditions run: | - echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" - echo "Is main branch merge from release push: ${{ steps.workflow-context.outputs.is_main_branch_merge_from_release_push }}" + echo "Is main branch push from feature merge: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }}" + echo "Is main branch push from release merge: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }}" echo "Is release branch PR: ${{ steps.workflow-context.outputs.is_release_branch_pr }}" echo "Is feature branch PR: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}" echo "Is feature branch draft PR: ${{ steps.workflow-context.outputs.is_feature_branch_draft_pr }}" diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 66efccd660..5f69d7c3f2 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -124,7 +124,7 @@ jobs: run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 @@ -133,8 +133,8 @@ jobs: run: | RUNS=1 - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then - RUNS=100 + if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_feature_merge }}" == "true" ]]; then + RUNS=5 fi if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" ]]; then From 02cbad15a431902a3e823afe5385ff60faa1bc71 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 13:07:39 -0700 Subject: [PATCH 4/5] fix --- .github/actions/determine_workflow_context/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/determine_workflow_context/action.yml b/.github/actions/determine_workflow_context/action.yml index 445c3f6056..d7fd3f9274 100644 --- a/.github/actions/determine_workflow_context/action.yml +++ b/.github/actions/determine_workflow_context/action.yml @@ -3,7 +3,7 @@ description: 'Determines the workflow context based on the current GitHub contex outputs: is_main_branch_push_from_feature_merge: description: 'True if this is a push to the main branch (excluding merges from release branches)' - value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} + value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_feature_merge }} is_main_branch_push_from_release_merge: description: 'True if this is a push to the main branch from a release branch merge' value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }} From d1f34e58d6cb30e393572e4def053e7fa59d4845 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 20 Dec 2024 13:09:51 -0700 Subject: [PATCH 5/5] no artificial delay --- .github/workflows/run_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 5f69d7c3f2..3e74670e81 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -119,12 +119,12 @@ jobs: working-directory: ${{ matrix.test.path }} - name: Start dfx with artificial delay 0 - if: ${{ steps.set-conditions.outputs.is_feature_branch_pr == 'true' || steps.set-conditions.outputs.is_feature_branch_draft_pr == 'true' }} + if: ${{ steps.set-conditions.outputs.is_feature_branch_pr == 'true' || steps.set-conditions.outputs.is_feature_branch_draft_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx - if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_feature_merge == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} + if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000