Skip to content

Commit

Permalink
ci: switch to npm workspaces setup (#670)
Browse files Browse the repository at this point in the history
* ci: switch to npm workspaces setup

should work just as nice and has a single lockfile for both projects in here.

the ui package can afterwards be called from the top-level using e.g. `npm run build --workspace ui`.
  • Loading branch information
boredland authored Oct 30, 2024
1 parent d735ebe commit 00da418
Show file tree
Hide file tree
Showing 14 changed files with 1,429 additions and 1,613 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

- name: verify
run: yarn check:sanity
run: npm run check:sanity
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
verification:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
cp cache/verification.json cache/verification.backup.json || :
- name: verify
run: yarn check:verification
run: npm run check:verification
# the verification step will exit with error code whenever there is a non verified contract
# we don't want the ci to fail yet though as there are already unverified contracts
# we might consider removing this in the future
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

- name: Generate library
run: yarn generate:addresses
run: npm run generate:addresses

- name: Create Pull Request
uses: peter-evans/create-pull-request@5fb55cc7c4af0547e8aa82d5580fe1dea5684b89 # pin@00897e0bc2ceba9f86c9b0fda8429107112e6fa5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
name: release-please
jobs:
test-node:
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@ea41920d7c7c656823137da415d1e3f59bf064bf # pin@main
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main
secrets: inherit

release-please:
Expand All @@ -25,7 +25,7 @@ jobs:
release-type: node

release-node:
uses: bgd-labs/github-workflows/.github/workflows/release-node.yml@ea41920d7c7c656823137da415d1e3f59bf064bf # pin@main
uses: bgd-labs/github-workflows/.github/workflows/release-node.yml@main
if: ${{ needs.release-please.outputs.releaseCreated }}
needs: release-please
secrets:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:

jobs:
test-solidity:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@ea41920d7c7c656823137da415d1e3f59bf064bf # pin@main
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
test-js:
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@ea41920d7c7c656823137da415d1e3f59bf064bf # pin@main
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main
if: github.event.pull_request.head.repo.full_name == github.repository
secrets: inherit
pkg-size-report:
Expand All @@ -33,7 +33,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-node-alpha:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
uses: bgd-labs/github-workflows/.github/workflows/release-node-alpha.yml@ea41920d7c7c656823137da415d1e3f59bf064bf # pin@main
uses: bgd-labs/github-workflows/.github/workflows/release-node-alpha.yml@main
needs:
- test-solidity
- test-js
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ node_modules/

dist/

.DS_STORE
.DS_STORE
.vercel
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ console.log(AaveV2Avalanche.CHAIN_ID);

### Generate files

The library is generated based on the `scripts/generateAddresses.ts` and `scripts/generateABIs.ts` scripts. You can regenerate the files by running `yarn start`.
The library is generated based on the `scripts/generateAddresses.ts` and `scripts/generateABIs.ts` scripts. You can regenerate the files by running `npm run start`.

### Dependencies

Expand All @@ -93,7 +93,7 @@ forge test

### Adding a new Pool

To list a new pool in the address book, you simply need to add a new pool in the respective [pools config](./scripts/configs/<type>/<network>) and run `yarn generate:addresses`.
To list a new pool in the address book, you simply need to add a new pool in the respective [pools config](./scripts/configs/<type>/<network>) and run `npm run generate:addresses`.

### Adding new Addresses

Expand All @@ -105,7 +105,7 @@ b) Adding an address that **cannot be obtained via onchain calls** so it needs t

To achieve an addition here, you need to alter the [additionalAddresses section](https://github.com/bgd-labs/aave-address-book/blob/main/scripts/config.ts#L46) on the pool type and add your address to the respective pools. Additional addresses will currently be exported as type `address`. There's currently no possibility to define a custom type.

In any case you need to run `yarn generate:addresses` afterwards and commit the altered artifacts.
In any case you need to run `npm run generate:addresses` afterwards and commit the altered artifacts.

### Troubleshooting

Expand Down
Loading

0 comments on commit 00da418

Please sign in to comment.