|
| 1 | +name: ERC6900 RI Test CI |
| 2 | + |
| 3 | +on: [pull_request, workflow_dispatch] |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{github.workflow}}-${{github.ref}} |
| 7 | + cancel-in-progress: true |
| 8 | + |
| 9 | +# Runs linter, tests, and inspection checker in parallel |
| 10 | +jobs: |
| 11 | + lint: |
| 12 | + name: Run Linters |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + - name: Install Foundry |
| 17 | + uses: foundry-rs/foundry-toolchain@v1 |
| 18 | + with: |
| 19 | + version: nightly |
| 20 | + - run: forge install |
| 21 | + |
| 22 | + - run: forge fmt --check |
| 23 | + |
| 24 | + - name: "Check out the repo" |
| 25 | + uses: "actions/checkout@v3" |
| 26 | + with: |
| 27 | + submodules: "recursive" |
| 28 | + |
| 29 | + - name: "Install Foundry" |
| 30 | + uses: "foundry-rs/foundry-toolchain@v1" |
| 31 | + |
| 32 | + - name: "Install Pnpm" |
| 33 | + uses: "pnpm/action-setup@v2" |
| 34 | + with: |
| 35 | + version: "8" |
| 36 | + |
| 37 | + - name: "Install Node.js" |
| 38 | + uses: "actions/setup-node@v3" |
| 39 | + with: |
| 40 | + cache: "pnpm" |
| 41 | + node-version: "lts/*" |
| 42 | + |
| 43 | + - name: "Install the Node.js dependencies" |
| 44 | + run: "pnpm install" |
| 45 | + |
| 46 | + - name: "Lint the contracts" |
| 47 | + run: "pnpm lint" |
| 48 | + |
| 49 | + test: |
| 50 | + name: Run Forge Tests |
| 51 | + runs-on: ubuntu-latest |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v3 |
| 54 | + with: |
| 55 | + submodules: recursive |
| 56 | + |
| 57 | + - name: Install Foundry |
| 58 | + uses: foundry-rs/foundry-toolchain@v1 |
| 59 | + with: |
| 60 | + version: nightly |
| 61 | + |
| 62 | + - name: Install forge dependencies |
| 63 | + run: forge install |
| 64 | + |
| 65 | + - name: Build project |
| 66 | + run: forge build |
| 67 | + |
| 68 | + - name: Run tests |
| 69 | + run: FOUNDRY_PROFILE=deep forge test -vvv |
| 70 | + |
| 71 | + test-lite: |
| 72 | + name: Run Forge Tests [lite build] |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v3 |
| 76 | + with: |
| 77 | + submodules: recursive |
| 78 | + |
| 79 | + - name: Install Foundry |
| 80 | + uses: foundry-rs/foundry-toolchain@v1 |
| 81 | + with: |
| 82 | + version: nightly |
| 83 | + |
| 84 | + - name: Install forge dependencies |
| 85 | + run: forge install |
| 86 | + |
| 87 | + - name: Build project |
| 88 | + run: FOUNDRY_PROFILE=lite forge build |
| 89 | + |
| 90 | + - name: Run tests |
| 91 | + run: FOUNDRY_PROFILE=lite forge test -vvv |
0 commit comments