-
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 250 commits
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
3342328
574f8c9
e6b8207
4128c77
47e1280
e67c533
cf2dcc7
4330108
318d311
a6d8672
e40034f
a2c372d
16e7af5
59a67a0
ac5b45e
4553827
9d8c385
9d72238
cf44adf
58b3ffa
e16934e
eca8874
df44324
31d9065
46de145
5e2741f
117cfb0
ba50923
9197bbd
4cdb9f9
c843eba
251e88c
4974dca
01234cb
927cede
9f72187
2d9c117
997bd55
ec2fe4b
dba605c
1043b4d
89766af
94ed78b
2946c1e
d266a61
f196723
f862532
05ebe69
d47ed4e
2c6e681
2dacbc7
f8c4d56
43add77
911cc58
4a364cc
7bf37ff
46da5a2
275fbfc
3b0d24b
e93f815
b5211f9
88abbe7
694f224
16917fc
53a2239
279357a
12b8303
ab34d7a
9d0e3e9
33680e1
68ac08e
9c06a36
e254a96
8aa5a8b
47b9962
c07ce55
1fa9cb7
965013e
eecb8d0
4948b47
0d279e8
497ee11
191f11d
26b95cc
d2b66d9
90393da
39b2f1a
cd83b20
b305da0
e39ea4b
a9ffa87
e75be45
7062815
786388c
f7eb2df
784ba71
2df9266
3e374bb
345a6df
d45a1b9
e340e49
7985eb7
2b85368
d06a34d
dad7b1a
b9f762b
c536ad8
14a31bb
6e234cc
a68a03e
f17cab9
9bc9a4f
24bd92b
c1959ee
1ceddde
f41be59
1a42b7a
80c74c7
052a8b4
a0147be
68983aa
b272a2d
a059486
9ff7f07
5559b1f
f2cf280
e2e8200
6258570
33c0f7b
4c01c3c
7973fa4
d944e19
345fc53
00acfd4
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