Skip to content

Commit

Permalink
Merge branch 'main' into get_canister_actor
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 20, 2024
2 parents 618b141 + d72f0ad commit 0628071
Show file tree
Hide file tree
Showing 27 changed files with 5,244 additions and 28,464 deletions.
4 changes: 2 additions & 2 deletions .github/actions/determine_workflow_config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/determine_workflow_context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/determine_workflow_context/action.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
Expand All @@ -75,15 +75,15 @@ 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
echo "AZLE_IS_FEATURE_BRANCH_DRAFT_PR=${{ steps.set-conditions.outputs.is_feature_branch_draft_pr }}" >> $GITHUB_ENV
- 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"
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
Loading

0 comments on commit 0628071

Please sign in to comment.