From f3f656721b68533a58da151e5ce354abd48a94f4 Mon Sep 17 00:00:00 2001 From: Cyrille Derche Date: Thu, 6 Jun 2024 15:43:08 +0200 Subject: [PATCH 1/2] added compile check --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d4982b..7529196 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,16 @@ on: branches: main jobs: - test: + compile: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: yarn install + - run: npx hardhat compile + test: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -18,5 +25,4 @@ jobs: env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # lint: # scripts: \ No newline at end of file From e29021f7b1a4c32fee4029bc556d38ca789434e9 Mon Sep 17 00:00:00 2001 From: Cyrille Derche Date: Thu, 6 Jun 2024 16:37:41 +0200 Subject: [PATCH 2/2] lint --- .github/workflows/ci.yml | 21 +++++++++++++--- package.json | 10 ++++++++ yarn.lock | 54 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7529196..158d169 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,15 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - run: yarn install - - run: npx hardhat compile + - run: yarn compile + + # ci: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # - run: yarn install + # - run: yarn ci test: runs-on: ubuntu-latest @@ -20,9 +28,16 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - run: yarn install - - run: SOLIDITY_COVERAGE=true npx hardhat coverage + - run: yarn coverage - uses: paambaati/codeclimate-action@v6.0.0 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # scripts: \ No newline at end of file + # deploy: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # - run: yarn install + # - run: npx hardhat node + # - run: yarn deploy --network localhost \ No newline at end of file diff --git a/package.json b/package.json index b0b646d..4605c37 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "main": "index.js", "license": "MIT", "devDependencies": { + "@biomejs/biome": "^1.8.0", "@nomicfoundation/hardhat-ignition": "^0.15.0", "@nomicfoundation/hardhat-ignition-viem": "^0.15.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", @@ -24,5 +25,14 @@ }, "dependencies": { "@openzeppelin/contracts": "^5.0.2" + }, + "scripts": { + "compile": "npx hardhat compile", + "test": "npx hardhat test", + "coverage": "SOLIDITY_COVERAGE=true npx hardhat coverage", + "lint": "npx @biomejs/biome lint ./test ./ignition/modules", + "format": "npx @biomejs/biome format --write ./test ./ignition/modules", + "ci": "npx @biomejs/biome ci ./test ./ignition/modules", + "deploy": "npx hardhat ignition deploy ./ignition/modules/Engagement.ts" } } diff --git a/yarn.lock b/yarn.lock index 6706fd9..2c55c09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,60 @@ resolved "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz" integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== +"@biomejs/biome@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.8.0.tgz#393f4c530582509938d58c3856b5a50179254df8" + integrity sha512-34xcE2z8GWrIz1sCFEmlHT/+4d+SN7YOqqvzlAKXKvaWPRJ2/NUwxPbRsP01P9QODkQ5bvGvc9rpBihmP+7RJQ== + optionalDependencies: + "@biomejs/cli-darwin-arm64" "1.8.0" + "@biomejs/cli-darwin-x64" "1.8.0" + "@biomejs/cli-linux-arm64" "1.8.0" + "@biomejs/cli-linux-arm64-musl" "1.8.0" + "@biomejs/cli-linux-x64" "1.8.0" + "@biomejs/cli-linux-x64-musl" "1.8.0" + "@biomejs/cli-win32-arm64" "1.8.0" + "@biomejs/cli-win32-x64" "1.8.0" + +"@biomejs/cli-darwin-arm64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.0.tgz#b3eb9644b5bbb393e993ac5acc9570ef21907380" + integrity sha512-dBAYzfIJ1JmWigKlWourT3sJ3I60LZPjqNwwlsyFjiv5AV7vPeWlHVVIImV2BpINwNjZQhpXnwDfVnGS4vr7AA== + +"@biomejs/cli-darwin-x64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.0.tgz#a31eada9b57cf33cb9655593b1df2b5ff2d4f092" + integrity sha512-ZTTSD0bP0nn9UpRDGQrQNTILcYSj+IkxTYr3CAV64DWBDtQBomlk2oVKWzDaA1LOhpAsTh0giLCbPJaVk2jfMQ== + +"@biomejs/cli-linux-arm64-musl@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.0.tgz#ca66b8635f8f55f320e247a5febed8bb56dc3b91" + integrity sha512-+ee/pZWsvhDv6eRI00krRNSgAg8DKSxzOv3LUsCjto6N1VzqatTASeQv2HRfG1nitf79rRKM75LkMJbqEfiKww== + +"@biomejs/cli-linux-arm64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.0.tgz#147ab4d9bcfb4cc1baee90a367acf0fef5c42649" + integrity sha512-cx725jTlJS6dskvJJwwCQaaMRBKE2Qss7ukzmx27Rn/DXRxz6tnnBix4FUGPf1uZfwrERkiJlbWM05JWzpvvXg== + +"@biomejs/cli-linux-x64-musl@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.0.tgz#4c80358c178327fccee660f0cebcc7a78c20bcb0" + integrity sha512-VPA4ocrAOak50VYl8gOAVnjuFFDpIUolShntc/aWM0pZfSIMbRucxnrfUfp44EVwayxjK6ruJTR5xEWj93WvDA== + +"@biomejs/cli-linux-x64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.0.tgz#de1ab7649324c72b74e16c5234ef6191a8bc34fd" + integrity sha512-cmgmhlD4QUxMhL1VdaNqnB81xBHb3R7huVNyYnPYzP+AykZ7XqJbPd1KcWAszNjUk2AHdx0aLKEBwCOWemxb2g== + +"@biomejs/cli-win32-arm64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.0.tgz#1527e7bbcf9abd27302225591ef150da1656393a" + integrity sha512-J31spvlh39FfRHQacYXxJX9PvTCH/a8+2Jx9D1lxw+LSF0JybqZcw/4JrlFUWUl4kF3yv8AuYUK0sENScc3g9w== + +"@biomejs/cli-win32-x64@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.0.tgz#d566d6d27ba262691eaac7c54b7a41560d390130" + integrity sha512-uPHHvu76JC1zYe9zZDcOU9PAg+1MZmPuNgWkb5jljaDeATvzLFPB+0nuJTilf603LXL+E8IdPQAO61Wy2VuEJA== + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz"