Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

on: [push]

name: ci
Expand All @@ -14,15 +13,19 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 10
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn install --network-concurrency 1
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile
if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}

lint-sol:
name: Solidity lint
Expand All @@ -35,21 +38,25 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 10
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run linting
run: yarn lint:sol
run: pnpm lint:sol

foundry-tests:
name: Foundry tests
Expand All @@ -62,13 +69,17 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 10
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -89,14 +100,18 @@ jobs:
# - uses: actions/setup-node@v1
# with:
# node-version: 18
# - uses: pnpm/action-setup@v2
# with:
# version: 10
# - uses: actions/cache@master
# id: yarn-cache
# id: pnpm-cache
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
# - run: yarn coverage || true
# .pnpm-store
# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
# - run: pnpm coverage || true
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ report/
# Ignore .DS_Store files on macOS
.DS_Store

# Yarn
# PNPM
node_modules/
yarn-error.log
pnpm-error.log

# Env vars
.env
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ Base and preset **implementations of common token standards**:

Clone the repository, including git submodules.

Install dependencies with `yarn`.
Install dependencies with `pnpm i`.

Compile the contracts with `yarn build`.
Compile the contracts with `pnpm build`.

### Testing

Run tests with `yarn test`.
Run tests with `pnpm test`.

Run coverage report with `yarn coverage`. View coverage report with `genhtml -o report --branch-coverage --ignore-errors category lcov.info && py -m http.server`. Viewing the report with this command requires Python to be installed.
Run coverage report with `pnpm run coverage`. View coverage report with `genhtml -o report --branch-coverage --ignore-errors category lcov.info && py -m http.server`. Viewing the report with this command requires Python to be installed.

Compare gas usage with `yarn snapshot:compare`. Note as some test use random values, the gas usage may vary slightly between runs.
Compare gas usage with `pnpm run snapshot:compare`. Note as some test use random values, the gas usage may vary slightly between runs.

### Deployment

Expand All @@ -43,7 +43,7 @@ cp .env.example .env
Then run the deployment script.

```sh
yarn deploy --rpc-url $RPC_URL --broadcast
pnpm deploy --rpc-url $RPC_URL --broadcast
```

## Dependencies
Expand Down
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pre-commit:
commands:
lint-and-format:
glob: '**/*.sol'
run: yarn format:sol {staged_files} && yarn lint:sol {staged_files} && git add {staged_files}
run: pnpm run format:sol {staged_files} && pnpm run lint:sol {staged_files} && git add {staged_files}
Loading
Loading