|
1 | 1 | name: CI |
| 2 | + |
2 | 3 | on: |
3 | 4 | push: |
4 | 5 | branches: |
5 | 6 | - 'master' |
6 | | - - 'qa' |
7 | 7 | - 'develop' |
8 | 8 | pull_request: |
9 | 9 | branches: |
@@ -180,119 +180,3 @@ jobs: |
180 | 180 | uses: actions/download-artifact@v4.1.8 |
181 | 181 | - name: Upload coverage to Codecov |
182 | 182 | uses: codecov/codecov-action@v3 |
183 | | - |
184 | | - e2e-tests: |
185 | | - if: (github.event.action != 'closed' || github.event.pull_request.merged == true) |
186 | | - strategy: |
187 | | - matrix: |
188 | | - os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments |
189 | | - runs-on: ${{ matrix.os }} |
190 | | - steps: |
191 | | - - uses: actions/checkout@v4 |
192 | | - with: |
193 | | - path: bor |
194 | | - - name: Checkout submodules |
195 | | - run: | |
196 | | - cd bor |
197 | | - git submodule update --init --recursive --force |
198 | | - git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master |
199 | | -
|
200 | | - - uses: actions/setup-go@v5 |
201 | | - with: |
202 | | - go-version: 1.24.3 |
203 | | - |
204 | | - - name: Checkout matic-cli |
205 | | - uses: actions/checkout@v4 |
206 | | - with: |
207 | | - repository: maticnetwork/matic-cli |
208 | | - ref: heimdall-v2 |
209 | | - path: matic-cli |
210 | | - |
211 | | - - name: Install dependencies on Linux |
212 | | - if: runner.os == 'Linux' |
213 | | - run: | |
214 | | - sudo apt update |
215 | | - sudo apt install build-essential |
216 | | - curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash |
217 | | - sudo apt install jq curl |
218 | | -
|
219 | | - - uses: actions/setup-node@v3 |
220 | | - with: |
221 | | - node-version: '18.19.0' |
222 | | - cache: 'npm' |
223 | | - cache-dependency-path: | |
224 | | - matic-cli/package-lock.json |
225 | | - matic-cli/devnet/code/contracts/package-lock.json |
226 | | - matic-cli/devnet/code/genesis-contracts/package-lock.json |
227 | | - matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json |
228 | | -
|
229 | | - - name: Install solc-select |
230 | | - run: | |
231 | | - sudo apt update |
232 | | - sudo apt install python3 python3-pip -y |
233 | | - sudo ln -sf /usr/bin/python3 /usr/bin/python |
234 | | - pip install solc-select |
235 | | -
|
236 | | - - name: Install Solidity Version |
237 | | - run: | |
238 | | - solc-select install 0.5.17 |
239 | | - solc-select install 0.6.12 |
240 | | - solc-select use 0.5.17 |
241 | | - solc --version |
242 | | -
|
243 | | - - name: Install Foundry |
244 | | - uses: foundry-rs/foundry-toolchain@v1 |
245 | | - |
246 | | - - name: Bootstrap devnet |
247 | | - run: | |
248 | | - cd matic-cli |
249 | | - npm install --prefer-offline --no-audit --progress=false |
250 | | - mkdir devnet |
251 | | - cd devnet |
252 | | - ../bin/matic-cli.js setup devnet -c ../../bor/.github/matic-cli-config.yml |
253 | | -
|
254 | | - - name: Launch devnet |
255 | | - run: | |
256 | | - cd matic-cli/devnet |
257 | | - bash ../util-scripts/docker/devnet_setup.sh |
258 | | - cd - |
259 | | - timeout 2m bash bor/integration-tests/bor_health.sh |
260 | | -
|
261 | | - - name: Run smoke tests |
262 | | - run: | |
263 | | - timeout 20m bash bor/integration-tests/smoke_test.sh |
264 | | -
|
265 | | - - name: Run RPC Tests |
266 | | - run: | |
267 | | - echo "Starting RPC Tests..." |
268 | | - timeout 5m bash bor/integration-tests/rpc_test.sh |
269 | | -
|
270 | | - - name: Resolve absolute path for logs |
271 | | - id: pathfix |
272 | | - run: | |
273 | | - echo "ABS_LOG_PATH=$(realpath matic-cli/devnet/logs)" >> $GITHUB_ENV |
274 | | -
|
275 | | - - name: Upload logs |
276 | | - if: always() |
277 | | - uses: PaloAltoNetworks/upload-secure-artifact@main |
278 | | - with: |
279 | | - name: logs_${{ github.run_id }} |
280 | | - path: ${{ env.ABS_LOG_PATH }} |
281 | | - |
282 | | - - name: Package code and chain data |
283 | | - if: always() |
284 | | - run: | |
285 | | - cd matic-cli/devnet |
286 | | - docker compose down --remove-orphans |
287 | | - cd - |
288 | | - mkdir -p ${{ github.run_id }}/matic-cli |
289 | | - sudo mv bor ${{ github.run_id }} |
290 | | - sudo mv matic-cli/devnet ${{ github.run_id }}/matic-cli |
291 | | - sudo tar --warning=no-file-changed --exclude='.git' -czf code.tar.gz ${{ github.run_id }} |
292 | | -
|
293 | | - - name: Upload code and chain data |
294 | | - if: always() |
295 | | - uses: PaloAltoNetworks/upload-secure-artifact@main |
296 | | - with: |
297 | | - name: code_${{ github.run_id }} |
298 | | - path: code.tar.gz |
0 commit comments