Skip to content

Commit 251b918

Browse files
Merge branch 'main' into feat/gasless-vote-relay
# Conflicts: # .env.example # src/components/transactions/GovVote/GovVoteActions.tsx
2 parents 8e8b598 + 5eba52a commit 251b918

31 files changed

Lines changed: 24045 additions & 15945 deletions

.github/actions/build/action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Build app and static
22
description: Build nextjs app and export static files
33
inputs:
4-
YARN_COMMAND:
5-
description: yarn command to run
4+
COMMAND:
5+
description: command to run
66
required: false
77
default: 'build:static'
88
NEXT_PUBLIC_ENV:
@@ -53,14 +53,16 @@ inputs:
5353
runs:
5454
using: 'composite'
5555
steps:
56+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
57+
5658
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
5759
with:
5860
node-version-file: '.nvmrc'
59-
cache: 'yarn'
61+
cache: 'pnpm'
6062

6163
- name: install
6264
shell: sh
63-
run: yarn --frozen-lockfile --prefer-offline
65+
run: pnpm install --frozen-lockfile --prefer-offline
6466

6567
- name: Restore next cache
6668
uses: actions/cache@v4
@@ -76,7 +78,7 @@ runs:
7678
7779
- name: build
7880
shell: sh
79-
run: yarn ${{ inputs.YARN_COMMAND }}
81+
run: pnpm run ${{ inputs.COMMAND }}
8082
env:
8183
NEXT_PUBLIC_ENV: '${{ inputs.NEXT_PUBLIC_ENV }}'
8284
NEXT_PUBLIC_ENABLE_GOVERNANCE: 'true'

.github/actions/cypress/action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,29 @@ inputs:
1010
CYPRESS_TENDERLY_PROJECT:
1111
description: tenderly porject name
1212
required: true
13-
YARN_TEST_COMMAND:
14-
description: yarn command to run test
13+
TEST_COMMAND:
14+
description: command to run for tests
1515
required: true
1616
runs:
1717
using: 'composite'
1818
steps:
19+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
20+
1921
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2022
with:
2123
node-version-file: '.nvmrc'
22-
cache: 'yarn'
24+
cache: 'pnpm'
2325

2426
- name: install
2527
shell: sh
2628
run: |
27-
yarn --frozen-lockfile --prefer-offline
28-
yarn add serve
29+
pnpm install --frozen-lockfile --prefer-offline
30+
pnpm add serve
31+
# pnpm doesn't reliably repopulate the Cypress binary cache
32+
# (~/.cache/Cypress) on warm CI runs the way yarn did, and that dir
33+
# isn't part of the pnpm store cache. Download it explicitly so the
34+
# `install: false` step below finds the binary. Idempotent.
35+
pnpm exec cypress install
2936
3037
- name: download build
3138
if: github.event_name != 'workflow_run'
@@ -50,9 +57,9 @@ runs:
5057
headless: true
5158
install: false
5259
record: false
53-
start: yarn serve:static
60+
start: pnpm serve:static
5461
wait-on: 'http://localhost:3000'
55-
command: ${{ inputs.YARN_TEST_COMMAND }}
62+
command: ${{ inputs.TEST_COMMAND }}
5663
env:
5764
CYPRESS_URL: 'http://localhost:3000'
5865
CYPRESS_TENDERLY_ACCOUNT: ${{ inputs.CYPRESS_TENDERLY_ACCOUNT }}

.github/workflows/build-fork.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
branches: ['main']
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
runs-on: ubuntu-latest

.github/workflows/build-test-deploy-dev.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
pull_request:
99
branches: ['main']
1010

11+
# Default least-privilege token; jobs that comment on PRs elevate below.
12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
build:
1317
runs-on: ubuntu-latest
@@ -70,11 +74,14 @@ jobs:
7074
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
7175
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
7276
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
73-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
77+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
7478

7579
next_js_analyze:
7680
runs-on: ubuntu-latest
7781
needs: build
82+
permissions:
83+
contents: read
84+
pull-requests: write # posts bundle-analysis comment on the PR
7885
steps:
7986
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
8087

@@ -93,6 +100,9 @@ jobs:
93100
runs-on: ubuntu-latest
94101
needs:
95102
- build
103+
permissions:
104+
contents: read
105+
pull-requests: write # pinata-action comments the IPFS hash on the PR
96106
steps:
97107
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
98108

@@ -144,7 +154,7 @@ jobs:
144154
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
145155
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
146156
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
147-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
157+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
148158

149159
cypress_app_functionality:
150160
runs-on: ubuntu-latest
@@ -169,4 +179,4 @@ jobs:
169179
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
170180
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
171181
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
172-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
182+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts

.github/workflows/build-test-deploy.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
push:
99
branches: ['main']
1010

11+
# Default least-privilege token; jobs that comment or release elevate below.
12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
build:
1317
runs-on: ubuntu-latest
@@ -31,9 +35,6 @@ jobs:
3135
uses: ./.github/actions/build
3236
with:
3337
NEXT_PUBLIC_ENV: 'prod'
34-
NEXT_PUBLIC_FORK_BASE_CHAIN_ID: ${{ secrets[format('FORK_BASE_CHAIN_ID_{0}', github.event.pull_request.number)] }}
35-
NEXT_PUBLIC_FORK_CHAIN_ID: ${{ secrets[format('FORK_CHAIN_ID_{0}', github.event.pull_request.number)] }}
36-
NEXT_PUBLIC_FORK_URL_RPC: ${{ secrets[format('FORK_URL_RPC_{0}', github.event.pull_request.number)] }}
3738
NEXT_PUBLIC_MIXPANEL: ${{ secrets.NEXT_PUBLIC_MIXPANEL }}
3839
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
3940
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
@@ -92,11 +93,14 @@ jobs:
9293
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
9394
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
9495
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
95-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
96+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
9697

9798
next_js_analyze:
9899
runs-on: ubuntu-latest
99100
needs: build
101+
permissions:
102+
contents: read
103+
pull-requests: write # posts bundle-analysis comment
100104
steps:
101105
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
102106

@@ -118,6 +122,8 @@ jobs:
118122
runs-on: ubuntu-latest
119123
needs:
120124
- build
125+
permissions:
126+
contents: write # pinata-action leaves a commit comment on push events
121127
outputs:
122128
pinata_hash: '${{ steps.pinata.outputs.hash }}'
123129
steps:
@@ -162,7 +168,7 @@ jobs:
162168
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
163169
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
164170
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
165-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
171+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
166172

167173
cypress_app_functionality:
168174
runs-on: ubuntu-latest
@@ -187,7 +193,7 @@ jobs:
187193
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
188194
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
189195
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
190-
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
196+
TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
191197

192198
prepare_release:
193199
if: |
@@ -199,6 +205,8 @@ jobs:
199205
- build_staging
200206
- cypress_full_v3
201207
- cypress_app_functionality
208+
permissions:
209+
contents: write # reusable workflow creates a GitHub release
202210
uses: ./.github/workflows/update-prod-staging.yml
203211
with:
204212
PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}'
@@ -212,6 +220,8 @@ jobs:
212220
needs:
213221
- deploy
214222
- build_staging
223+
permissions:
224+
contents: write # reusable workflow creates a GitHub release
215225
uses: ./.github/workflows/update-prod-staging.yml
216226
with:
217227
PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}'

.github/workflows/crowdin-download.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- cron: '0 */6 * * *'
1010
workflow_dispatch:
1111

12+
# Checkout + git push both authenticate with BOT_TOKEN, so GITHUB_TOKEN only needs read.
13+
permissions:
14+
contents: read
15+
1216
jobs:
1317
download-from-crowdin:
1418
name: Download sources from Crowdin
@@ -21,10 +25,12 @@ jobs:
2125
with:
2226
token: ${{ secrets.BOT_TOKEN }}
2327

28+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
29+
2430
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2531
with:
2632
node-version-file: '.nvmrc'
27-
cache: 'yarn'
33+
cache: 'pnpm'
2834

2935
- name: crowdin action
3036
uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1 # v2.13.0
@@ -46,8 +52,8 @@ jobs:
4652
then
4753
echo "tree is clean"
4854
else
49-
yarn --frozen-lockfile
50-
yarn i18n:compile
55+
pnpm install --frozen-lockfile
56+
pnpm i18n:compile
5157
git add .
5258
git config --global user.name 'Crowdin bot'
5359
git config --global user.email 'crowdin-bot@aave.com'

.github/workflows/crowdin-upload.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
# Crowdin sync authenticates with BOT_TOKEN, so GITHUB_TOKEN only needs read.
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
upload-to-crowdin:
1115
name: Upload sources to Crowdin
@@ -15,10 +19,12 @@ jobs:
1519
- name: Checkout
1620
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1721

22+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
23+
1824
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
1925
with:
2026
node-version-file: '.nvmrc'
21-
cache: 'yarn'
27+
cache: 'pnpm'
2228

2329
- name: Synchronize
2430
uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1 # v2.13.0

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ jobs:
1717
comment-summary-in-pr: on-failure
1818
fail-on-severity: moderate
1919
license-check: false
20+
show-openssf-scorecard: false
21+
show-patched-versions: true

.github/workflows/i18n-check.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
push:
1111
branches: ['main']
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
i18n-check:
1518
runs-on: ubuntu-latest
@@ -19,7 +22,7 @@ jobs:
1922
- name: i18n compile
2023
uses: ./.github/actions/build
2124
with:
22-
YARN_COMMAND: i18n
25+
COMMAND: i18n
2326
USE_NEXT_CACHE: 'false'
2427

2528
- name: check diff
@@ -28,7 +31,7 @@ jobs:
2831
then
2932
echo "i18n up to date"
3033
else
31-
echo "please run yarn i18n"
34+
echo "please run pnpm i18n"
3235
exit 1
3336
exit
3437
fi

0 commit comments

Comments
 (0)