@@ -28,27 +28,27 @@ jobs:
2828 working-directory : packages/sharing-smart-contract
2929 run : npm ci
3030
31- # - name: Install Foundry
32- # uses: foundry-rs/foundry-toolchain@v1
33- # with:
34- # version: stable
35- # cache: true
31+ - name : Install Foundry
32+ uses : foundry-rs/foundry-toolchain@v1
33+ with :
34+ version : stable
35+ cache : true
3636
37- # - name: Compile
38- # working-directory: packages/sharing-smart-contract
39- # run: npm run compile
37+ - name : Compile
38+ working-directory : packages/sharing-smart-contract
39+ run : npm run compile
4040
41- # - name: Check Format
42- # working-directory: packages/sharing-smart-contract
43- # run: npm run check-format
41+ - name : Check Format
42+ working-directory : packages/sharing-smart-contract
43+ run : npm run check-format
4444
45- # - name: Lint
46- # working-directory: packages/sharing-smart-contract
47- # run: npm run lint
45+ - name : Lint
46+ working-directory : packages/sharing-smart-contract
47+ run : npm run lint
4848
49- # - name: UML Diagrams
50- # working-directory: packages/sharing-smart-contract
51- # run: npm run uml
49+ - name : UML Diagrams
50+ working-directory : packages/sharing-smart-contract
51+ run : npm run uml
5252
5353 - name : Static Analyzer
5454@@ -58,51 +58,51 @@ jobs:
5858 fail-on : none
5959 target : ' packages/sharing-smart-contract/'
6060
61- # - name: Start Anvil
62- # run: |
63- # anvil --host 0.0.0.0 --port 8545 --hardfork berlin --fork-url https://bellecour.iex.ec --chain-id 134 --gas-limit 6700000 --gas-price 0 &
64-
65- # - name: Wait for Anvil to start
66- # run: |
67- # timeout=30
68- # interval=1
69- # echo "Waiting for Anvil to start..."
70- # for ((i=0; i<timeout; i++)); do
71- # if nc -z localhost 8545; then
72- # echo "Anvil is operational."
73- # exit 0
74- # fi
75- # echo "Attempt $((i+1)) of $timeout: Anvil is not ready, waiting ${interval}s..."
76- # sleep $interval
77- # done
78- # echo "Error: Anvil did not start within the timeout period."
79- # exit 1
80-
81- # - name: Upgrade test
82- # working-directory: packages/sharing-smart-contract
83- # run: npm run upgrade-local-fork -- --network local-bellecour-fork
84-
85- # # TODO check why the CI does not fail when the following error occurs
86- # # (when the RPC node is not available):
87- # # 1) Uncaught error outside test suite
88- # - name: Hardhat tests
89- # working-directory: packages/sharing-smart-contract
90- # run: npm run test -- --network local-bellecour-fork
91-
92- # - name: Test deployment script
93- # working-directory: packages/sharing-smart-contract
94- # run: |
95- # POCO_ADDRESS=0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f \
96- # DATASET_REGISTRY_ADDRESS=0x799DAa22654128d0C64d5b79eac9283008158730 \
97- # npm run deploy -- --network local-bellecour-fork
98-
99- # - name: Set Directory Permissions
100- # working-directory: packages/sharing-smart-contract
101- # run: sudo chmod -R 777 .
102-
103- # - name: Forge Tests
104- # working-directory: packages/sharing-smart-contract
105- # run: forge test --no-match-test "invariant" -vvvv
61+ - name : Start Anvil
62+ run : |
63+ anvil --host 0.0.0.0 --port 8545 --hardfork berlin --fork-url https://bellecour.iex.ec --chain-id 134 --gas-limit 6700000 --gas-price 0 &
64+
65+ - name : Wait for Anvil to start
66+ run : |
67+ timeout=30
68+ interval=1
69+ echo "Waiting for Anvil to start..."
70+ for ((i=0; i<timeout; i++)); do
71+ if nc -z localhost 8545; then
72+ echo "Anvil is operational."
73+ exit 0
74+ fi
75+ echo "Attempt $((i+1)) of $timeout: Anvil is not ready, waiting ${interval}s..."
76+ sleep $interval
77+ done
78+ echo "Error: Anvil did not start within the timeout period."
79+ exit 1
80+
81+ - name : Upgrade test
82+ working-directory : packages/sharing-smart-contract
83+ run : npm run upgrade-local-fork -- --network local-bellecour-fork
84+
85+ # TODO check why the CI does not fail when the following error occurs
86+ # (when the RPC node is not available):
87+ # 1) Uncaught error outside test suite
88+ - name : Hardhat tests
89+ working-directory : packages/sharing-smart-contract
90+ run : npm run test -- --network local-bellecour-fork
91+
92+ - name : Test deployment script
93+ working-directory : packages/sharing-smart-contract
94+ run : |
95+ POCO_ADDRESS=0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f \
96+ DATASET_REGISTRY_ADDRESS=0x799DAa22654128d0C64d5b79eac9283008158730 \
97+ npm run deploy -- --network local-bellecour-fork
98+
99+ - name : Set Directory Permissions
100+ working-directory : packages/sharing-smart-contract
101+ run : sudo chmod -R 777 .
102+
103+ - name : Forge Tests
104+ working-directory : packages/sharing-smart-contract
105+ run : forge test --no-match-test "invariant" -vvvv
106106
107107 - name : Upload SARIF file
108108 uses : github/codeql-action/upload-sarif@v3
0 commit comments