|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{github.workflow}}-${{github.ref}} |
| 7 | + cancel-in-progress: true |
| 8 | + |
| 9 | +env: |
| 10 | + MAINNET_RPC: ${{ secrets.MAINNET_RPC }} |
| 11 | + SEPOLIA_RPC: ${{ secrets.SEPOLIA_RPC }} |
| 12 | + |
| 13 | +jobs: |
| 14 | + unit-tests: |
| 15 | + name: Run Unit Tests |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Install Foundry |
| 21 | + uses: foundry-rs/foundry-toolchain@v1 |
| 22 | + with: |
| 23 | + version: stable |
| 24 | + |
| 25 | + - name: Use Node.js |
| 26 | + uses: actions/setup-node@v4 |
| 27 | + with: |
| 28 | + node-version: 20.x |
| 29 | + cache: 'yarn' |
| 30 | + |
| 31 | + - name: Install dependencies |
| 32 | + run: yarn --frozen-lockfile --network-concurrency 1 |
| 33 | + |
| 34 | + - name: Precompile |
| 35 | + run: yarn build |
| 36 | + |
| 37 | + - name: Run tests |
| 38 | + shell: bash |
| 39 | + run: yarn test:unit |
| 40 | + |
| 41 | + integration-tests: |
| 42 | + name: Run Integration Tests |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + |
| 47 | + - name: Install Foundry |
| 48 | + uses: foundry-rs/foundry-toolchain@v1 |
| 49 | + with: |
| 50 | + version: stable |
| 51 | + |
| 52 | + - name: Use Node.js |
| 53 | + uses: actions/setup-node@v4 |
| 54 | + with: |
| 55 | + node-version: 20.x |
| 56 | + cache: 'yarn' |
| 57 | + |
| 58 | + - name: Install dependencies |
| 59 | + run: yarn --frozen-lockfile --network-concurrency 1 |
| 60 | + |
| 61 | + - name: Precompile |
| 62 | + run: yarn build |
| 63 | + |
| 64 | + - name: Run tests |
| 65 | + run: yarn test:integration |
| 66 | + |
| 67 | + medusa-tests: |
| 68 | + name: Medusa Test |
| 69 | + runs-on: ubuntu-latest |
| 70 | + container: ghcr.io/trailofbits/eth-security-toolbox/ci:nightly-20241223 |
| 71 | + |
| 72 | + steps: |
| 73 | + - name: Checkout repository |
| 74 | + uses: actions/checkout@v4 |
| 75 | + with: |
| 76 | + submodules: recursive |
| 77 | + |
| 78 | + - name: Install dependencies |
| 79 | + run: yarn --frozen-lockfile --network-concurrency 1 |
| 80 | + |
| 81 | + - name: Run Medusa |
| 82 | + run: medusa fuzz --test-limit 200000 |
| 83 | + |
| 84 | + halmos-tests: |
| 85 | + name: Run symbolic execution tests |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v4 |
| 89 | + |
| 90 | + - name: Install Foundry |
| 91 | + uses: foundry-rs/foundry-toolchain@v1 |
| 92 | + with: |
| 93 | + version: stable |
| 94 | + |
| 95 | + - name: Use Node.js |
| 96 | + uses: actions/setup-node@v4 |
| 97 | + with: |
| 98 | + node-version: 20.x |
| 99 | + cache: 'yarn' |
| 100 | + |
| 101 | + - name: Install dependencies |
| 102 | + run: yarn --frozen-lockfile --network-concurrency 1 |
| 103 | + |
| 104 | + - name: Precompile |
| 105 | + run: yarn build |
| 106 | + |
| 107 | + - name: Run tests |
| 108 | + run: yarn test:integration |
| 109 | + |
| 110 | + lint: |
| 111 | + name: Lint Commit Messages |
| 112 | + runs-on: ubuntu-latest |
| 113 | + |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@v4 |
| 116 | + with: |
| 117 | + fetch-depth: 0 |
| 118 | + |
| 119 | + - uses: wagoid/commitlint-github-action@v5 |
| 120 | + |
| 121 | + - name: Install Foundry |
| 122 | + uses: foundry-rs/foundry-toolchain@v1 |
| 123 | + with: |
| 124 | + version: stable |
| 125 | + |
| 126 | + - name: Use Node.js |
| 127 | + uses: actions/setup-node@v4 |
| 128 | + with: |
| 129 | + node-version: 20.x |
| 130 | + cache: 'yarn' |
| 131 | + |
| 132 | + - name: Install dependencies |
| 133 | + run: yarn --frozen-lockfile --network-concurrency 1 |
| 134 | + |
| 135 | + - run: yarn lint:check |
0 commit comments