Skip to content

Commit 320c7b2

Browse files
committed
Merge remote-tracking branch 'origin/develop' into bernardo/cow-568-m2-wallet-connection-eip-6963
2 parents 42e0a70 + aadd4aa commit 320c7b2

File tree

82 files changed

+4573
-5525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4573
-5525
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3333
with:
3434
persist-credentials: false
3535

3636
- name: Install pnpm
37-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
37+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
3838

3939
- name: Set up node
40-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
40+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4141
with:
4242
node-version: ${{ env.NODE_VERSION }}
4343
cache: pnpm
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Cache generated files
4949
id: cache-generated-files
50-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
50+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
5151
with:
5252
path: |
5353
apps/cowswap-frontend/src/locales
@@ -60,15 +60,15 @@ jobs:
6060

6161
steps:
6262
- name: Checkout code
63-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6464
with:
6565
persist-credentials: false
6666

6767
- name: Install pnpm
68-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
68+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
6969

7070
- name: Set up node
71-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
71+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7272
with:
7373
node-version: ${{ env.NODE_VERSION }}
7474
cache: pnpm
@@ -78,7 +78,7 @@ jobs:
7878

7979
- name: Load generated files
8080
id: cache-generated-files
81-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
81+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
8282
with:
8383
path: |
8484
apps/cowswap-frontend/src/locales
@@ -99,15 +99,15 @@ jobs:
9999

100100
steps:
101101
- name: Checkout code
102-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
102+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
103103
with:
104104
persist-credentials: false
105105

106106
- name: Install pnpm
107-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
107+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
108108

109109
- name: Set up node
110-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
110+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
111111
with:
112112
node-version: ${{ env.NODE_VERSION }}
113113
cache: pnpm
@@ -117,7 +117,7 @@ jobs:
117117

118118
- name: Load generated files
119119
id: cache-generated-files
120-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
120+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
121121
with:
122122
path: |
123123
apps/cowswap-frontend/src/locales
@@ -126,57 +126,23 @@ jobs:
126126
- name: Run eslint
127127
run: pnpm run lint
128128

129-
build:
130-
name: Build
131-
needs: setup
132-
runs-on: ubuntu-latest
133-
134-
steps:
135-
- name: Checkout code
136-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
137-
with:
138-
persist-credentials: false
139-
140-
- name: Install pnpm
141-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
142-
143-
- name: Set up node
144-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
145-
with:
146-
node-version: ${{ env.NODE_VERSION }}
147-
cache: pnpm
148-
149-
- name: Install dependencies
150-
run: pnpm install --frozen-lockfile
151-
152-
- name: Load generated files
153-
id: cache-generated-files
154-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
155-
with:
156-
path: |
157-
apps/cowswap-frontend/src/locales
158-
key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }}
159-
160-
- name: Build
161-
run: pnpm run build
162-
163129
integration-tests:
164130
name: Cypress
165131
runs-on: ubuntu-latest
166132
steps:
167133
- name: Checkout code
168-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
169135
with:
170136
persist-credentials: false
171137

172138
- name: Increase watchers
173139
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
174140

175141
- name: Install pnpm
176-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
142+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
177143

178144
- name: Set up node
179-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
145+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
180146
with:
181147
node-version: ${{ env.NODE_VERSION }}
182148
cache: pnpm
@@ -194,7 +160,7 @@ jobs:
194160
# Actually run tests, building repo
195161
- name: Cypress run
196162
id: cypress-run
197-
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
163+
uses: cypress-io/github-action@0f330ebf0d60f87608ed72f1d6232e5644aa3171 # v7.1.1
198164
with:
199165
wait-on: http://[::1]:3000
200166
wait-on-timeout: 600
@@ -221,7 +187,7 @@ jobs:
221187

222188
notify-failure:
223189
name: Notify Slack on Failure
224-
needs: [setup, build, test, lint]
190+
needs: [setup, test, lint]
225191
runs-on: ubuntu-latest
226192
if: failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
227193

.github/workflows/cow-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
persist-credentials: false
2525

.github/workflows/ipfs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
persist-credentials: false
3131

3232
- name: Install pnpm
33-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
33+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
3434

3535
- name: Set up node
36-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
36+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3737
with:
3838
node-version: ${{ env.NODE_VERSION }}
3939
cache: pnpm

.github/workflows/npm.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,78 @@
1+
name: Release Please
2+
13
on:
24
push:
35
branches:
46
- main
7+
workflow_dispatch:
8+
9+
env:
10+
NODE_VERSION: lts/jod
11+
PUBLISHABLE_LIBS: events types permit-utils widget-lib widget-react iframe-transport hook-dapp-lib
512

613
permissions:
714
contents: write
815
pull-requests: write
916

10-
name: release-please
11-
1217
jobs:
1318
release-please:
1419
runs-on: ubuntu-latest
20+
outputs:
21+
releases_created: ${{ steps.release.outputs.releases_created }}
1522
steps:
16-
- uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4.3.0
17-
name: release
23+
# 1️⃣ Run release-please
24+
- name: Run release-please
25+
uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
26+
id: release
1827
with:
1928
token: ${{ secrets.RELEASE_PLEASE_AUTH }}
20-
include-component-in-tag: true
29+
target-branch: main
2130
config-file: release-please-config.json
2231
manifest-file: .release-please-manifest.json
23-
default-branch: main
24-
target-branch: main
32+
33+
publish:
34+
runs-on: ubuntu-latest
35+
needs: release-please
36+
if: needs.release-please.outputs.releases_created == 'true'
37+
steps:
38+
# 1️⃣ Checkout the repo
39+
- name: Checkout code
40+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
42+
# 2️⃣ Setup pnpm
43+
- name: Install pnpm
44+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
45+
46+
# 3️⃣ Setup Node
47+
- name: Set up node
48+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
49+
with:
50+
node-version: ${{ env.NODE_VERSION }}
51+
cache: pnpm
52+
53+
# 4️⃣ Install dependencies
54+
- name: Install dependencies
55+
run: pnpm install --frozen-lockfile
56+
57+
# 5️⃣ Build publishable libs
58+
- name: Build publishable libs
59+
run: pnpm nx run-many -t build -p ${{ env.PUBLISHABLE_LIBS }}
60+
61+
# 6️⃣ Setup npm auth
62+
- name: Setup npm auth
63+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
64+
env:
65+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
66+
67+
# 7️⃣ Publish released packages
68+
- name: Publish released packages
69+
run: |
70+
for lib in ${{ env.PUBLISHABLE_LIBS }}; do
71+
if [ -d "dist/libs/$lib" ]; then
72+
echo "Publishing $lib..."
73+
cp "libs/$lib/README.md" "dist/libs/$lib/" 2>/dev/null || true
74+
cd "dist/libs/$lib"
75+
npm publish --tag latest --access public || echo "Failed to publish $lib (may already exist)"
76+
cd - > /dev/null
77+
fi
78+
done

.github/workflows/vercel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
persist-credentials: false
3131

3232
- name: Install pnpm
33-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
33+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
3434

3535
- name: Set up node
36-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
36+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3737
with:
3838
node-version: ${{ env.NODE_VERSION }}
3939
cache: pnpm

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"apps/cowswap-frontend": "2.0.2",
2+
"apps/cowswap-frontend": "2.0.3",
33
"apps/explorer": "3.0.2",
44
"libs/permit-utils": "2.0.1",
55
"libs/widget-lib": "1.0.1",

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,13 @@ Follow ALL rules defined in CONTRIBUTING.md exactly.
230230
```
231231

232232
This ensures both human contributors and AI assistants adhere to consistent coding standards in this repository.
233+
234+
## 12. Nx cloud
235+
236+
1. Run `npx nx login` and use your `@cow.fi` account (https://nx.dev/docs/guides/nx-cloud/personal-access-tokens)
237+
2. If you experience problems with caching:
238+
- open Vercel build and look for a link like https://cloud.nx.app/runs/0d5C83MrNY. In the link click on the task that didn't hit cache and click to `Compare to similar tasks`. With this tool you can compare the build and see what prevents caching.
239+
- In most of the cases, it would be some flacky files, you can debug it using following links:
240+
- https://nx.dev/docs/reference/inputs
241+
- https://nx.dev/docs/concepts/how-caching-works#fine-tuning-nxs-cache
242+
3. In Vercel env variables, there are two different `NX_CLOUD_AUTH_TOKEN`. Token for production environment (`develop` branch) has write access.

0 commit comments

Comments
 (0)