chore(deps): bump SonarSource/sonarcloud-github-action from 9f9bba2c7aaf7a55eac26abbac906c3021d211b2 to ba3875ecf642b2129de2b589510c81a8b53dbf4e #13035
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Contracts Testing | |
| on: | |
| workflow_dispatch: | |
| merge_group: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| paths-ignore: | |
| - "kleros-sdk/**" | |
| - "services/**" | |
| - "subgraph/**" | |
| - "web/**" | |
| pull_request: | |
| branches: | |
| - "*" | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| # *********************************************************************************** # | |
| # ******************************* Hardhat Tests ************************************* # | |
| # *********************************************************************************** # | |
| hardhat-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
| with: | |
| disable-sudo: false | |
| egress-policy: block | |
| allowed-endpoints: > | |
| binaries.soliditylang.org:443 | |
| classic.yarnpkg.com:443 | |
| github.com:443 | |
| nightly.yarnpkg.com:443 | |
| nodejs.org:443 | |
| objects.githubusercontent.com:443 | |
| registry.yarnpkg.com:443 | |
| registry.npmjs.org:443 | |
| 54.185.253.63:443 | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| - name: Set up corepack (for yarn) | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.9.2 --activate | |
| yarn set version 4.9.2 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| with: | |
| node-version: 20.x | |
| cache: yarn | |
| - name: Cache node modules | |
| uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: | | |
| ~/.npm | |
| **/node_modules | |
| key: ${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}- | |
| - name: Install contracts dependencies | |
| run: yarn workspace @kleros/kleros-v2-contracts install | |
| - name: Run Hardhat tests | |
| run: yarn test | |
| working-directory: contracts | |
| # *********************************************************************************** # | |
| # ******************************* Foundry Tests ************************************* # | |
| # *********************************************************************************** # | |
| # COMPILATION FAILS 🤬 | |
| # foundry-tests: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Harden Runner | |
| # uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
| # with: | |
| # disable-sudo: false | |
| # egress-policy: block | |
| # allowed-endpoints: > | |
| # binaries.soliditylang.org:443 | |
| # classic.yarnpkg.com:443 | |
| # github.com:443 | |
| # nightly.yarnpkg.com:443 | |
| # nodejs.org:443 | |
| # objects.githubusercontent.com:443 | |
| # registry.yarnpkg.com:443 | |
| # registry.npmjs.org:443 | |
| # 54.185.253.63:443 | |
| # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # with: | |
| # submodules: recursive | |
| # - name: Set up corepack (for yarn) | |
| # run: | | |
| # corepack enable | |
| # corepack prepare yarn@4.9.2 --activate | |
| # yarn set version 4.9.2 | |
| # - name: Setup Node.js environment | |
| # uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
| # with: | |
| # node-version: 20.x | |
| # cache: yarn | |
| # - name: Cache node modules | |
| # uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1 | |
| # env: | |
| # cache-name: cache-node-modules | |
| # with: | |
| # path: | | |
| # ~/.npm | |
| # **/node_modules | |
| # key: ${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}- | |
| # # - name: Install contracts dependencies | |
| # # run: yarn workspace @kleros/kleros-v2-contracts install | |
| # - name: Install Foundry | |
| # uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0 | |
| # - name: Run Foundry tests | |
| # run: forge test --config-path ./foundry.toml | |
| # working-directory: contracts | |
| # - name: Run snapshot | |
| # run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY | |
| # working-directory: contracts |