Skip to content

Commit 7f8384c

Browse files
changed ci script
1 parent 996ef9a commit 7f8384c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/ci-stylus-e2e-tests.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,24 @@ jobs:
5151
sudo chmod a+x /usr/bin/solc
5252
- name: Setup nitro node
5353
run: ./scripts/nitro-testnode.sh -d -i
54-
- name: Set up Environment
54+
- name: Run tests
5555
run: |
56+
# Set up environment variables
5657
echo "RPC_URL=http://localhost:8547" >> $GITHUB_ENV
5758
echo "PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" >> $GITHUB_ENV
5859
echo "WALLER_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" >> $GITHUB_ENV
59-
- name: Deploy Mock Pyth Contract
60-
run: |
61-
cd pyth-mock-solidity
62-
deployed_to=$(forge script ./script/MockPyth.s.sol:MockPythScript \
63-
--rpc-url "$RPC_URL" \
64-
--private-key "$PRIVATE_KEY" \
65-
--broadcast \
66-
| grep -oP '(?<=Pyth contract address: )0x[a-fA-F0-9]{40}' | tail -n 1)
67-
echo "MOCK_PYTH_ADDRESS=$deployed_to" >> $GITHUB_ENV
68-
- name: run integration tests
69-
run: ./scripts/e2e-tests.sh
60+
61+
# Deploy Mock Pyth Contract only if not running in CI
62+
if [ -z "$CI" ]; then
63+
cd pyth-mock-solidity
64+
deployed_to=$(forge script ./script/MockPyth.s.sol:MockPythScript \
65+
--rpc-url "$RPC_URL" \
66+
--private-key "$PRIVATE_KEY" \
67+
--broadcast \
68+
| grep -oP '(?<=Pyth contract address: )0x[a-fA-F0-9]{40}' | tail -n 1)
69+
echo "MOCK_PYTH_ADDRESS=$deployed_to" >> $GITHUB_ENV
70+
cd ..
71+
fi
72+
73+
# Run Integration Tests
74+
./scripts/e2e-tests.sh

0 commit comments

Comments
 (0)