From fdc79e5330d17e4486aedc4b4c54c4ad24f9dd64 Mon Sep 17 00:00:00 2001 From: Yuri Tkachenko Date: Mon, 23 Sep 2024 12:51:00 +0100 Subject: [PATCH 1/4] fix: ci runners node version --- .github/workflows/analyse.yml | 4 +-- package-lock.json | 48 ++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index c3334c3c..34bf9a05 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -19,7 +19,7 @@ jobs: - name: Setup node.js version uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x cache: "npm" - name: Install node deps @@ -62,7 +62,7 @@ jobs: - name: Setup node.js version uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x - name: Install solhint run: > diff --git a/package-lock.json b/package-lock.json index 0848faa7..2d87dbd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,8 @@ "@ethersproject/providers": "^5.6.8", "@lidofinance/evm-script-decoder": "^0.2.2", "@openzeppelin/contracts": "4.6.0", - "chalk": "4.1.2" + "chalk": "4.1.2", + "p-limit": "3.1.0" }, "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.0.6", @@ -16742,21 +16743,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/mocha/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -17114,15 +17100,18 @@ } }, "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "license": "MIT", "dependencies": { - "p-try": "^1.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { @@ -17137,6 +17126,19 @@ "node": ">=4" } }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -17157,6 +17159,7 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -20015,7 +20018,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "engines": { "node": ">=10" }, From a561bebbecb5e3aa32d2ac1a660c397c578c5fc0 Mon Sep 17 00:00:00 2001 From: Yuri Tkachenko Date: Mon, 23 Sep 2024 12:54:07 +0100 Subject: [PATCH 2/4] ci: add trigger on push and PR --- .github/workflows/analyse.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index 34bf9a05..e9374f77 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -1,10 +1,6 @@ name: Code Analysis -on: - push: - branches: [main] - pull_request: - branches: [main] +on: [push, pull_request] jobs: slither: From 440c7c0e68e7a17e3453072367a51d57ba9fd677 Mon Sep 17 00:00:00 2001 From: Yuri Tkachenko Date: Mon, 23 Sep 2024 12:56:24 +0100 Subject: [PATCH 3/4] ci: use only PR, no need to check every push --- .github/workflows/analyse.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index e9374f77..012881f6 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -1,6 +1,6 @@ name: Code Analysis -on: [push, pull_request] +on: [pull_request] jobs: slither: From fe8478f9cf9ea4dad17444e3f8ae252137074d88 Mon Sep 17 00:00:00 2001 From: Yuri Tkachenko Date: Mon, 23 Sep 2024 13:00:34 +0100 Subject: [PATCH 4/4] chore: formatting --- .github/workflows/analyse.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index 012881f6..be18beaa 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -4,10 +4,13 @@ on: [pull_request] jobs: slither: + name: Slither runs-on: ubuntu-latest + permissions: contents: read security-events: write + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -50,7 +53,9 @@ jobs: sarif_file: results.sarif solhint: + name: Solhint runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v3