Skip to content

Commit

Permalink
Updating GitHub workflows and husky (#186)
Browse files Browse the repository at this point in the history
* Updating github workflows for pnpm 9

* Updating husky from 4 to 8

* Updating husky to v9
  • Loading branch information
corbanbrook authored Jun 7, 2024
1 parent 36b23b9 commit 145b79a
Show file tree
Hide file tree
Showing 5 changed files with 7,385 additions and 5,928 deletions.
16 changes: 8 additions & 8 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ runs:
using: 'composite'

steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand All @@ -17,19 +22,14 @@ runs:
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
name: Solidity lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm lint:sol

test:
name: Test contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm build
- run: pnpm test
Expand All @@ -41,7 +41,7 @@ jobs:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm coverage || true
- name: Coveralls
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
name: Foundry tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lint:ts": "eslint -c .eslintrc.js \"./**/*.ts\"",
"lint:ts:fix": "eslint -c .eslintrc.js --fix \"./**/*.ts\"",
"format": "prettier --write ./**/*.ts",
"adapter": "typechain --target ethers-v5 --out-dir gen/typechain \"./artifacts/contracts/**/*[^dbg].json\""
"adapter": "typechain --target ethers-v5 --out-dir gen/typechain \"./artifacts/contracts/**/*[^dbg].json\"",
"prepare": "husky"
},
"types": "gen/typechain/index.ts",
"files": [
Expand Down Expand Up @@ -61,7 +62,7 @@
"ganache-cli": "6.12.2",
"hardhat": "^2.20.1",
"hardhat-gas-reporter": "1.0.4",
"husky": "^4.2.3",
"husky": "^9.0.11",
"ora": "^5.4.1",
"rimraf": "^3.0.2",
"scrypt": "github:barrysteyn/node-scrypt#fb60a8d3c158fe115a624b5ffa7480f3a24b03fb",
Expand Down
Loading

0 comments on commit 145b79a

Please sign in to comment.