chore(deps): bump aws-actions/setup-sam from 12a6719db503425e98edcc798b6779590a450e8f to 819220f63fb333a9a394dd0a5cab2d8303fd17e2 #11077
Workflow file for this run
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: | |
| contracts-testing: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
| with: | |
| disable-sudo: true | |
| 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.5.1 --activate | |
| yarn set version 4.5.1 | |
| - 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@de808b1eea699e761c404bda44ba8f21aba30b2c # v1.3.1 | |
| - name: Install lcov | |
| run: sudo apt-get install -y lcov | |
| - name: Run Hardhat and Foundry tests with coverage | |
| run: yarn coverage | |
| working-directory: contracts | |
| - name: Upload a build artifact | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
| with: | |
| name: code-coverage-report | |
| path: contracts/coverage |