Skip to content

Commit 77acb6b

Browse files
committed
try clear
1 parent 760ced8 commit 77acb6b

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/tests.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- name: Set up Node.js
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: '22'
24-
cache: 'yarn' # Optional: cache dependencies for faster builds
23+
node-version: "22"
24+
cache: "yarn" # Optional: cache dependencies for faster builds
2525

2626
- name: Set up Docker
2727
uses: docker/setup-buildx-action@v2
@@ -56,9 +56,10 @@ jobs:
5656

5757
- name: Deploy account and capture SECRET/SALT
5858
run: |
59+
script -e -c "yarn clear-store"
5960
# Create a temporary file to store the output
6061
TEMP_OUTPUT=$(mktemp)
61-
62+
6263
# Run deploy-account script and capture both stdout and stderr
6364
if script -e -c "yarn deploy-account" > "$TEMP_OUTPUT" 2>&1; then
6465
echo "✅ Deploy account script completed successfully"
@@ -68,17 +69,17 @@ jobs:
6869
rm "$TEMP_OUTPUT"
6970
exit 1
7071
fi
71-
72+
7273
# Show the full output for debugging
7374
cat "$TEMP_OUTPUT"
74-
75+
7576
# Extract SECRET and SALT from the output
7677
SECRET_KEY=$(grep -o "🔑 Secret key generated: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/🔑 Secret key generated: //' || echo "")
7778
SALT_VALUE=$(grep -o "🧂 Salt generated: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/🧂 Salt generated: //' || echo "")
78-
79+
7980
# Clean up temp file
8081
rm "$TEMP_OUTPUT"
81-
82+
8283
# Validate and create .env file
8384
if [ -n "$SECRET_KEY" ] && [ -n "$SALT_VALUE" ]; then
8485
@@ -98,7 +99,7 @@ jobs:
9899
run: |
99100
# Create a temporary file to store the output
100101
TEMP_OUTPUT=$(mktemp)
101-
102+
102103
# Run deploy script and capture both stdout and stderr
103104
if script -e -c "yarn deploy" > "$TEMP_OUTPUT" 2>&1; then
104105
echo "✅ Deploy script completed successfully"
@@ -107,21 +108,21 @@ jobs:
107108
rm "$TEMP_OUTPUT"
108109
exit 1
109110
fi
110-
111+
111112
# Show the full output for debugging
112113
cat "$TEMP_OUTPUT"
113-
114+
114115
# Try multiple extraction patterns in order of preference
115116
VOTING_CONTRACT_ADDRESS=""
116-
117+
117118
# Look for "Contract address:" pattern
118119
if [ -z "$VOTING_CONTRACT_ADDRESS" ]; then
119120
VOTING_CONTRACT_ADDRESS=$(grep -o "Contract address: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/Contract address: //' || echo "")
120121
fi
121-
122+
122123
# Clean up temp file
123124
rm "$TEMP_OUTPUT"
124-
125+
125126
# Validate and save the address
126127
if [ -n "$VOTING_CONTRACT_ADDRESS" ]; then
127128
echo "VOTING_CONTRACT_ADDRESS=\"$VOTING_CONTRACT_ADDRESS\"" >> .env
@@ -130,6 +131,10 @@ jobs:
130131
- name: Run other scripts
131132
run: |
132133
script -e -c "yarn fees"
134+
script -e -c "yarn clear-store"
133135
script -e -c "yarn multiple-pxe"
136+
script -e -c "yarn clear-store"
134137
script -e -c "yarn profile"
138+
script -e -c "yarn clear-store"
135139
script -e -c "yarn interaction"
140+
script -e -c "yarn clear-store"

0 commit comments

Comments
 (0)