Skip to content

Commit da9a2b4

Browse files
committed
debug
1 parent 066f52b commit da9a2b4

File tree

2 files changed

+3
-180
lines changed

2 files changed

+3
-180
lines changed

.github/workflows/v-next-ci.yml

+2-179
Original file line numberDiff line numberDiff line change
@@ -57,189 +57,12 @@ jobs:
5757
- name: Run check
5858
run: node scripts/check-v-next-npm-scripts.js
5959

60-
list-packages:
61-
name: List packages
62-
needs: is-v-next
63-
if: ${{ needs.is-v-next.outputs.is_v_next == 'true' }}
64-
runs-on: ubuntu-latest
65-
outputs:
66-
packages: ${{ steps.filter.outputs.changes }}
67-
should_bundle: ${{ contains(steps.filter.outputs.hardhat_files, '.github/workflows/v-next-ci.yml') || contains(steps.filter.outputs.hardhat_files, 'pnpm-lock.yaml') }}
68-
steps:
69-
- uses: actions/checkout@v4
70-
- uses: actions/setup-node@v4
71-
with:
72-
node-version: 22
73-
- run: yq -p yaml -o json pnpm-lock.yaml | tee pnpm-lock.json
74-
- id: generate
75-
env:
76-
PACKAGE_IGNORE: |
77-
[
78-
".",
79-
"packages/",
80-
"v-next/hardhat/templates/"
81-
]
82-
COMMON_FILTERS: |
83-
[
84-
".github/workflows/v-next-ci.yml",
85-
"config-v-next/**",
86-
"pnpm-lock.yaml"
87-
]
88-
run: |
89-
echo "filters<<EOF" >> $GITHUB_OUTPUT
90-
node scripts/generate-filters.js |
91-
yq -Po yaml 'with_entries(.key |= sub("^v-next/", ""))' |
92-
tee -a $GITHUB_OUTPUT
93-
echo "EOF" >> $GITHUB_OUTPUT
94-
- id: filter
95-
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
96-
with:
97-
list-files: json
98-
filters: ${{ steps.generate.outputs.filters }}
99-
base: v-next # TODO: Remove once v-next becomes the default branch
100-
101-
bundle:
102-
# Depending on list-packages only to check whether pnpm-lock.yaml has changed
103-
# This could be handled by a simpler job, but an extra runner would have to be allocated for it
104-
needs: list-packages
105-
106-
if: needs.list-packages.outputs.should_bundle == 'true'
107-
108-
# Using a matrix strategy even though there's only one package
109-
# because we will want to add, at least, hardhat-toolbox in the future
110-
strategy:
111-
fail-fast: false
112-
matrix:
113-
package: ["hardhat"]
114-
115-
name: "[${{ matrix.package }}] bundle"
116-
runs-on: ubuntu-latest
117-
defaults:
118-
run:
119-
working-directory: v-next/${{ matrix.package }}
120-
steps:
121-
- uses: actions/checkout@v4
122-
- uses: ./.github/actions/setup-env
123-
with:
124-
node-version: 22
125-
- name: Install dependencies
126-
run: pnpm install --frozen-lockfile --prefer-offline
127-
- name: Build
128-
run: pnpm build
129-
- name: Deploy
130-
run: |
131-
pnpm deploy --config.shamefully-hoist=true --config.hoist=true --config.node-linker=true --config.shared-workspace-lockfile=false --filter="$(jq -r .name package.json)" --prod --no-optional bundle
132-
- uses: actions/upload-artifact@v4
133-
with:
134-
name: ${{ matrix.package }}
135-
path: |
136-
v-next/${{ matrix.package }}/bundle
137-
138-
bundle-aggregate:
139-
needs: bundle
140-
141-
if: ${{ !cancelled() }}
142-
143-
name: bundle
144-
runs-on: ubuntu-latest
145-
146-
permissions:
147-
pull-requests: write
148-
149-
steps:
150-
- env:
151-
result: ${{ needs.bundle.result }}
152-
run: |
153-
if [[ "$result" == "failure" ]]; then
154-
exit 1
155-
fi
156-
shell: bash
157-
- uses: actions/download-artifact@v4
158-
- id: download
159-
run: ls -1 | wc -l | xargs -I {} -0 echo "count={}" | tee -a $GITHUB_OUTPUT
160-
shell: bash
161-
- id: comment
162-
if: steps.download.outputs.count != '0'
163-
run: |
164-
echo 'body<<EOF' >> $GITHUB_OUTPUT
165-
for bundle in *; do
166-
echo "# $bundle" | tee -a $GITHUB_OUTPUT
167-
echo '' | tee -a $GITHUB_OUTPUT
168-
echo "Total size of the bundle: "'`'"$(du -sh $bundle --exclude=$bundle/node_modules/.pnpm | cut -f1)"'`' | tee -a $GITHUB_OUTPUT
169-
echo "Total number of dependencies (including transitive): "'`'"$(find $bundle/node_modules/@* $bundle/node_modules -mindepth 1 -maxdepth 1 -type d ! -name '.*' ! -name '@*' | wc -l)"'`' | tee -a $GITHUB_OUTPUT
170-
echo '' | tee -a $GITHUB_OUTPUT
171-
echo '<details>' | tee -a $GITHUB_OUTPUT
172-
echo '<summary>List of dependencies (sorted by size)</summary>' | tee -a $GITHUB_OUTPUT
173-
echo '' | tee -a $GITHUB_OUTPUT
174-
echo '```' | tee -a $GITHUB_OUTPUT
175-
du -shc $bundle/node_modules/@*/* $bundle/node_modules/* |
176-
grep -Ev '/node_modules/@[^/]+$' | sort -rh |
177-
sed "s|$bundle/node_modules/||" | tee -a $GITHUB_OUTPUT
178-
echo '```' | tee -a $GITHUB_OUTPUT
179-
echo '</details>' | tee -a $GITHUB_OUTPUT
180-
echo '' | tee -a $GITHUB_OUTPUT
181-
done
182-
echo 'EOF' >> $GITHUB_OUTPUT
183-
- if: github.event_name == 'pull_request' && steps.download.outputs.count != '0'
184-
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
185-
with:
186-
header: bundle
187-
message: ${{ steps.comment.outputs.body }}
188-
189-
lint:
190-
needs: list-packages
191-
192-
if: needs.list-packages.outputs.packages != '[]'
193-
194-
strategy:
195-
fail-fast: false
196-
matrix:
197-
package: ${{ fromJson(needs.list-packages.outputs.packages) }}
198-
199-
name: "[${{ matrix.package }}] lint"
200-
runs-on: ubuntu-latest
201-
defaults:
202-
run:
203-
working-directory: v-next/${{ matrix.package }}
204-
205-
steps:
206-
- uses: actions/checkout@v4
207-
- uses: ./.github/actions/setup-env
208-
with:
209-
node-version: 22
210-
- name: Install dependencies
211-
run: pnpm install --frozen-lockfile --prefer-offline
212-
- name: Build
213-
run: pnpm build
214-
- name: Lint
215-
run: pnpm lint
216-
217-
lint-aggregate:
218-
needs: lint
219-
220-
if: ${{ !cancelled() }}
221-
222-
name: lint
223-
runs-on: ubuntu-latest
224-
225-
steps:
226-
- env:
227-
result: ${{ needs.lint.result }}
228-
run: |
229-
if [[ "$result" == "failure" ]]; then
230-
exit 1
231-
fi
232-
shell: bash
233-
23460
ci:
235-
needs: list-packages
236-
237-
if: needs.list-packages.outputs.packages != '[]'
23861

23962
strategy:
24063
fail-fast: false
24164
matrix:
242-
package: ${{ fromJson(needs.list-packages.outputs.packages) }}
65+
package: ['hardhat']
24366
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
24467
node: [22]
24568

@@ -261,7 +84,7 @@ jobs:
26184
- name: Run tests
26285
env:
26386
__DO_NOT_USE_IS_HARDHAT_CI: true
264-
run: pnpm run test
87+
run: pnpm run test:only
26588

26689
ci-aggregate:
26790
needs: ci

v-next/hardhat/test/internal/builtin-plugins/solidity/build-system/cache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe("ObjectCache", () => {
5151
await cache.set(randomKey, "randomValue");
5252
assert.equal(await cache.get(randomKey), "randomValue");
5353
});
54-
it("should overwrite the value if the key is present", async () => {
54+
it.only("should overwrite the value if the key is present", async () => {
5555
const randomKey = randomUUID();
5656
await cache.set(randomKey, "randomValue");
5757
assert.equal(await cache.get(randomKey), "randomValue");

0 commit comments

Comments
 (0)