-
Notifications
You must be signed in to change notification settings - Fork 51
Release #2076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Release #2076
Changes from all commits
78b3169
738ef2c
82f8b1c
52f86ac
a374113
a0cb09d
5353ccf
831b062
3d211cc
95f2803
277457c
d1910ca
8d0edf4
c1bad1d
be33847
cabc743
b19b82d
1dbfedf
37bd43f
0a10ad2
257870c
4a451a5
5ca5c3b
bd4e169
31efb24
96e48f8
0f31e0e
d63d000
78f180a
413a85a
9895c7c
2f711f3
da90234
0cadf21
e6572d5
635aa6d
9401c9b
8f4993d
3b59568
f02d718
f2b2183
03376da
524116c
9618a6f
5468d55
1aae950
208e009
42cc971
057957e
d0a9a80
f734873
582b674
e4d4bdb
1d37d89
3ed7310
c9e7334
ea5b3a7
361fa55
6636c6d
e6114ba
9d31252
baf9695
4cc634f
14fedbb
63d3a64
e6e83ae
1d1f9f2
b7888c2
d3c215e
323ba18
953bd95
d794975
62b0a50
a7cfba0
1ba64db
068df77
188f8d0
bd589e7
6f92514
2cfeec4
4aa2cd2
b490c96
ef3a64c
fb6ca6a
5e987c4
98f7eac
030eedf
6ded616
63744e9
262f940
bd210be
40714da
758a809
7a5d08d
e9f8a0a
923bd7b
daa8bf9
4e384c9
8636c23
36a2455
59ca8e1
5dc39fa
79a458c
1ec4e02
f1ec484
8b6e1f9
7a78b27
83a21bd
6bea072
62d5723
0e3fb9c
f77b92f
e41329b
8f438dd
8032917
1b6c98a
568eb40
96bb505
78833f3
4530869
cfdb1f4
7c30463
e7578d2
bd983ca
c97270a
f1dd559
fd465a4
8ecf061
41a5b77
cbc111a
452246f
e59e79b
e7971b8
835eea4
d82188a
79e4210
e1a3d05
55589e5
9d4b286
4f35c9d
e3dc195
942fa9e
20ae3a4
e2d7c81
b9a7a97
48abffb
859834b
56aaca8
94e4783
a8d32b8
0e96a87
6752cad
65f84cf
2842949
e827f63
6b74ebc
df07fbb
835d45b
5b35be9
06db2d0
615effc
11f84f7
ec9e89c
40d2240
45bcd0f
06cccaa
7cb1275
bc906e5
4d14f47
e21d261
cf59b86
f70050e
decd3e7
00be694
536e61c
374b4f2
f9fd944
a0a3a67
a934ba5
6b7e365
5a46536
87e5759
bcbe228
83a8ba6
700738e
cefa0cb
13f3708
3a930be
613b8c3
57319d4
8ab5d63
ca59e71
780e00a
c279eff
c40c12c
fac9901
973f572
6cbd494
5276f64
91ccfe9
d03832d
e2daec5
bbcc819
7df6109
0b4cb0c
8704a3c
ad1ff0d
6d76559
b22899c
4a3c20f
f8536e6
b6ca2ad
f5f3079
7f64aba
32fe70a
8795f88
2dd02dc
877ed81
578d4d5
42f721c
6b8970a
592243f
643d561
33f84ad
72062e7
487c5e9
697dac8
87d2a70
e5aa70c
81f8290
1193c19
d6cc3be
a3c9f91
4128c77
47e1280
cf2dcc7
4330108
318d311
a6d8672
e40034f
a2c372d
16e7af5
59a67a0
9d72238
e16934e
eca8874
117cfb0
ba50923
9197bbd
4cdb9f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,73 +15,129 @@ on: | |||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||
| - "*" | ||||||||||||||||||||||||||||||||||||||||||
| permissions: # added using https://github.com/step-security/secure-workflows | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| permissions: # added using https://github.com/step-security/secure-workflows | ||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||
| contracts-testing: | ||||||||||||||||||||||||||||||||||||||||||
| # *********************************************************************************** # | ||||||||||||||||||||||||||||||||||||||||||
| # ******************************* 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: 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 | ||||||||||||||||||||||||||||||||||||||||||
| - 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 }}- | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+61
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Cache the Yarn Berry artifacts instead of npm/node_modules. With Yarn 4 (PnP by default), - - name: Cache node modules
+ - name: Cache Yarn artifacts
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 }}-
+ path: |
+ .yarn/cache
+ .yarn/install-state.gz
+ key: ${{ runner.os }}-yarn-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-${{ secrets.CACHE_VERSION }}-📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| - name: Install contracts dependencies | ||||||||||||||||||||||||||||||||||||||||||
| run: yarn workspace @kleros/kleros-v2-contracts install | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+73
to
+75
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix install step: Yarn v4 doesn’t support This will either no-op or fail unless the workspace defines an - - name: Install contracts dependencies
- run: yarn workspace @kleros/kleros-v2-contracts install
+ - name: Install dependencies
+ run: |
+ yarn install --immutable
+ yarn workspaces focus @kleros/kleros-v2-contracts📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| - 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 | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Grant
actions: readso the cache can restore.When you set a restrictive
permissionsblock, unspecified scopes default tonone.actions/cacherequiresactions: readfor restore.📝 Committable suggestion
🤖 Prompt for AI Agents