Skip to content

Commit

Permalink
Add release downloader and improve counter
Browse files Browse the repository at this point in the history
  • Loading branch information
kisialiou committed Jan 31, 2025
1 parent 54995ba commit 213ebc5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: "Space-separated list of pipelines to run (e.g. 'bridge_token_near_to_evm another_pipeline')"
required: false
default: "bridge-token-near-to-evm"
release_tag:
description: "Release tag to download artifacts from (optional)"
required: false
type: string

jobs:
get-pipelines-matrix:
Expand Down Expand Up @@ -34,6 +38,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3

- name: Download release artifacts
if: ${{ inputs.release_tag != '' }}
uses: robinraju/release-downloader@v1
with:
repository: ${{ github.repository }}
tag: ${{ inputs.release_tag }}
fileName: "contracts.zip"
out-file-path: "e2e-testing/generated/near_artifacts"
extract: true

- name: Setup E2E environment
uses: ./.github/e2e-setup
with:
Expand Down
13 changes: 12 additions & 1 deletion e2e-testing/makefiles/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ endef
# Progress bar for waiting operations
define progress_wait
@for i in $$(seq 1 $(1)); do \
printf "\rProgress: [%-$(1)s] %d%%" "$$(printf '#%.0s' $$(seq 1 $$i))" "$$((i * 100 / $(1)))"; \
if [ $$((i % 30)) -eq 0 ] || [ $$i -eq 1 ] || [ $$i -eq $(1) ]; then \
remaining_secs=$$(( $(1) - i )); \
remaining_mins=$$((remaining_secs / 60)); \
elapsed_secs=$$i; \
elapsed_mins=$$((elapsed_secs / 60)); \
printf "\r%d%% | Elapsed: %dm %ds | Remaining: %dm %ds" \
"$$((i * 100 / $(1)))" \
"$$elapsed_mins" \
"$$((elapsed_secs % 60))" \
"$$remaining_mins" \
"$$((remaining_secs % 60))"; \
fi; \
sleep 1; \
done; \
printf '\n'
Expand Down

0 comments on commit 213ebc5

Please sign in to comment.