Skip to content

Commit

Permalink
fix: ensure workflow stops on error
Browse files Browse the repository at this point in the history
  • Loading branch information
ermineJose committed Nov 5, 2024
1 parent ec643f5 commit b5563b9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,18 @@ jobs:
SN_LOG: "v"
timeout-minutes: 2

- name: Estimate cost to create a vault
- name: create local user data
run: |
# 1 MB
python3 -c "with open('random.txt', 'wb') as f: f.write(bytearray([0xff] * 1 * 1024 * 1024))"
./target/release/autonomi --log-output-dest=data-dir file upload random.txt
./target/release/autonomi --log-output-dest=data-dir register create sample_new_register 1234
./target/release/autonomi --log-output-dest=data-dir vault cost
env:
SN_LOG: "v"
timeout-minutes: 2

- name: Estimate cost to create a vault
run: ./target/release/autonomi --log-output-dest=data-dir vault cost
env:
SN_LOG: "v"
timeout-minutes: 2
Expand All @@ -370,6 +375,7 @@ jobs:
- name: add more files - linux/macos
if: matrix.os != 'windows-latest'
run: |
set -e
for i in {1..100}; do
dd if=/dev/urandom of=random_file_$i.bin bs=1M count=1 status=none
./target/release/autonomi --log-output-dest=data-dir file upload random_file_$i.bin --public
Expand All @@ -384,7 +390,8 @@ jobs:
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
for ($i = 1; $i -le 100; $i++) {
$ErrorActionPreference = "Stop"
for ($i = 1; $i -le 10; $i++) {
python3 -c "import sys; with open(sys.argv[1], 'wb') as f: f.write(bytearray([0xff] * 1 * 1024 * 1024))" "random_file_$i.bin"
# Run autonomi commands
Expand All @@ -406,6 +413,7 @@ jobs:
if: matrix.os != 'windows-latest'
shell: bash
run: |
set -e
NUM_OF_PUBLIC_FILES=""
NUM_OF_PRIVATE_FILES=""
NUM_OF_REGISTERS=""
Expand Down Expand Up @@ -513,6 +521,7 @@ jobs:
- name: Time profiling for Different files
if: matrix.os != 'windows-latest'
run: |
set -e
# 1 MB
python3 -c "with open('random_1MB.bin', 'wb') as f: f.write(bytearray([0xff] * 1 * 1024 * 1024))"
# 10 MB
Expand Down

0 comments on commit b5563b9

Please sign in to comment.