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
12 changes: 7 additions & 5 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build app and static
description: Build nextjs app and export static files
inputs:
YARN_COMMAND:
description: yarn command to run
COMMAND:
description: command to run
required: false
default: 'build:static'
NEXT_PUBLIC_ENV:
Expand Down Expand Up @@ -53,14 +53,16 @@ inputs:
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache: 'pnpm'

- name: install
shell: sh
run: yarn --frozen-lockfile --prefer-offline
run: pnpm install --frozen-lockfile --prefer-offline

- name: Restore next cache
uses: actions/cache@v4
Expand All @@ -76,7 +78,7 @@ runs:

- name: build
shell: sh
run: yarn ${{ inputs.YARN_COMMAND }}
run: pnpm run ${{ inputs.COMMAND }}
env:
NEXT_PUBLIC_ENV: '${{ inputs.NEXT_PUBLIC_ENV }}'
NEXT_PUBLIC_ENABLE_GOVERNANCE: 'true'
Expand Down
21 changes: 14 additions & 7 deletions .github/actions/cypress/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,29 @@ inputs:
CYPRESS_TENDERLY_PROJECT:
description: tenderly porject name
required: true
YARN_TEST_COMMAND:
description: yarn command to run test
TEST_COMMAND:
description: command to run for tests
required: true
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache: 'pnpm'

- name: install
shell: sh
run: |
yarn --frozen-lockfile --prefer-offline
yarn add serve
pnpm install --frozen-lockfile --prefer-offline
pnpm add serve
# pnpm doesn't reliably repopulate the Cypress binary cache
# (~/.cache/Cypress) on warm CI runs the way yarn did, and that dir
# isn't part of the pnpm store cache. Download it explicitly so the
# `install: false` step below finds the binary. Idempotent.
pnpm exec cypress install

- name: download build
if: github.event_name != 'workflow_run'
Expand All @@ -50,9 +57,9 @@ runs:
headless: true
install: false
record: false
start: yarn serve:static
start: pnpm serve:static
wait-on: 'http://localhost:3000'
command: ${{ inputs.YARN_TEST_COMMAND }}
command: ${{ inputs.TEST_COMMAND }}
env:
CYPRESS_URL: 'http://localhost:3000'
CYPRESS_TENDERLY_ACCOUNT: ${{ inputs.CYPRESS_TENDERLY_ACCOUNT }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts

next_js_analyze:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts

cypress_app_functionality:
runs-on: ubuntu-latest
Expand All @@ -169,4 +169,4 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
6 changes: 3 additions & 3 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts

next_js_analyze:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts

cypress_app_functionality:
runs-on: ubuntu-latest
Expand All @@ -187,7 +187,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts

prepare_release:
if: |
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:
with:
token: ${{ secrets.BOT_TOKEN }}

- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache: 'pnpm'

- name: crowdin action
uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1 # v2.13.0
Expand All @@ -46,8 +48,8 @@ jobs:
then
echo "tree is clean"
else
yarn --frozen-lockfile
yarn i18n:compile
pnpm install --frozen-lockfile
pnpm i18n:compile
git add .
git config --global user.name 'Crowdin bot'
git config --global user.email 'crowdin-bot@aave.com'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache: 'pnpm'

- name: Synchronize
uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1 # v2.13.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/i18n-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: i18n compile
uses: ./.github/actions/build
with:
YARN_COMMAND: i18n
COMMAND: i18n
USE_NEXT_CACHE: 'false'

- name: check diff
Expand All @@ -28,7 +28,7 @@ jobs:
then
echo "i18n up to date"
else
echo "please run yarn i18n"
echo "please run pnpm i18n"
exit 1
exit
fi
6 changes: 3 additions & 3 deletions .github/workflows/test-deploy-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: '${{ secrets.TENDERLY_ACCOUNT }}'
CYPRESS_TENDERLY_KEY: '${{ secrets.TENDERLY_KEY }}'
CYPRESS_TENDERLY_PROJECT: '${{ secrets.TENDERLY_PROJECT }}'
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts

deploy_fork:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: '${{ secrets.TENDERLY_ACCOUNT }}'
CYPRESS_TENDERLY_KEY: '${{ secrets.TENDERLY_KEY }}'
CYPRESS_TENDERLY_PROJECT: '${{ secrets.TENDERLY_PROJECT }}'
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts

cypress_app_functionality:
runs-on: ubuntu-latest
Expand All @@ -177,7 +177,7 @@ jobs:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts

notify_failure:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
yarn i18n
pnpm i18n
git add ./src/locales
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Use a hoisted (flat) node_modules for compatibility with packages that rely
# on hoisting. Eases the migration from yarn and avoids phantom-dependency errors.
node-linker=hoisted

# Uncomment for CoW Preview Releases

# @cowprotocol:registry=https://npm.pkg.github.com
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.19
24
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
node_modules/
public/
.nvmrc
.npmrc

# Artifacts
.next/
Expand All @@ -26,3 +27,4 @@ src/locales/
*.mermaid
*.log
*.lock
pnpm-lock.yaml
26 changes: 16 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,16 @@ nvm use

### Install Dependencies

Download [Yarn Package Manager](https://yarnpkg.com/) and install the dependencies.
Install [pnpm](https://pnpm.io/) **v10 or later** (this repo pins `pnpm@10.18.0` via the `packageManager` field). The simplest way is to enable [corepack](https://nodejs.org/api/corepack.html), which reads that field and uses the correct version automatically:

```bash
yarn install
corepack enable
```

Then install the dependencies:

```bash
pnpm install
```

### Setup Environment Variables
Expand All @@ -79,33 +85,33 @@ Once you’ve completed the prerequisites above, you should be able to start run
Development builds are run with a watcher and an open server listening on `localhost:3000`.

```bash
yarn dev
pnpm dev
```

### Production Mode

Production-based builds are great for usage on serverless & container-based hosting platforms like [Vercel](https://vercel.com) or [Heroku](https://heroku.com). To compile the source files into minified, production-ready asset bundles, run the build command.

```bash
yarn build
pnpm build
```

There is also the option to build the application for usages as a static site on platforms like IPFS, AWS, Vercel, etc. This essentially builds the application as above and additionally uses the `next export` command. More information around Next’s export command can be found [here](https://nextjs.org/docs/advanced-features/static-html-export).

```bash
yarn build:static
pnpm build:static
```

To start the server in production mode and use these bundled, minified assets, run the following command. This will start the web server listening on `localhost:3000`.

```bash
yarn start
pnpm start
```

You can also serve up the static site assets with the following command, which can be viewable on `localhost:3000`.

```bash
yarn serve:static
pnpm serve:static
```

### Test Mode
Expand All @@ -122,14 +128,14 @@ NEXT_PUBLIC_FORK_CHAIN_ID=1
NEXT_PUBLIC_FORK_URL_RPC=<your rpc url>
```

For running the integration test suite, you’ll need to have the application running locally in a separate terminal. You may choose to either run it in development mode via `yarn dev` or against a static production build via `yarn build:static` & `yarn serve:static`. The caveat to running in development mode is that it will be more resource-intensive, since the application will be built on the fly.
For running the integration test suite, you’ll need to have the application running locally in a separate terminal. You may choose to either run it in development mode via `pnpm dev` or against a static production build via `pnpm build:static` & `pnpm serve:static`. The caveat to running in development mode is that it will be more resource-intensive, since the application will be built on the fly.

```bash
# open interactive cypress test suite
yarn test:open
pnpm test:open

# run all tests in headless mode
yarn test:headless
pnpm test:headless
```

## Environment Variables
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ Enabling users to:

## How to use

Requires [Node](https://nodejs.org) (see `.nvmrc`) and [pnpm](https://pnpm.io/) **v10+**. The repo pins `pnpm@10.18.0` via the `packageManager` field, so running `corepack enable` will select the correct version automatically.

Install it and run:

```sh
cp .env.example .env.local
yarn
yarn dev
pnpm install
pnpm dev
```

## Contribution
Expand Down
Loading
Loading