diff --git a/.github/actions/determine_workflow_config/action.yml b/.github/actions/determine_workflow_config/action.yml index aef7a6dd1a..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' }} - 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..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 }}" - 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/actions/determine_workflow_context/action.yml b/.github/actions/determine_workflow_context/action.yml index aceb05a6ad..d7fd3f9274 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_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 }} @@ -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..3e74670e81 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" @@ -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 == '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 @@ -133,8 +133,8 @@ jobs: run: | RUNS=1 - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push }}" == "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 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..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 @@ -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_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 69fd05adc1..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 @@ -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_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 45338313db..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 @@ -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_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 bfcd77a955..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 @@ -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_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 677b82a281..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 @@ -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_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 d3600b2a68..496768412e 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_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 9a5903f302..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 @@ -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_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 de7b7deabb..24b79384af 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_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 5aadc6d689..0576a972df 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_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 7201886cd8..74376fe259 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_FROM_FEATURE_MERGE === 'true' ? 80 : 200;