Skip to content

Commit 37a1ebf

Browse files
Nstttfiorin
andauthored
feat: re-organization of repo structure (#116)
* feat: new organization * feat: new organization * feat: new organization * chore: justfile * chore: make pipelines work with new system * chore: run pipelines on PRs * feat: more organization of naming and folders * chore: update all vanilla deps * chore: even moredeps * feat: turbo working * chore: trying to make nx work * chore: new nx example * chore: attempting it work * chore: new example with rspack * chore: remove old example * chore: rename turbo * chore: use git * chore: only install on the vanilla folder * chore: fix ember * chore: make pipeline work with monorepos * chore: add rsbuild example * chore: missing env vars * chore: attempt at making CI work * chore: single pipeline * chore: fix tests * chore: upgrade webpack to enhanced * feat: build-all command * feat: extra script for build each folder all examples * test: fixing test file * test: fix all tests * chore: turbo proper outputs --------- Co-authored-by: Fiorin <[email protected]>
1 parent 5a6f456 commit 37a1ebf

File tree

1,194 files changed

+5261
-62664
lines changed

Some content is hidden

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

1,194 files changed

+5261
-62664
lines changed

.github/actions/setup/action.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ description: Sets up Node.js and PNPM with caching
44
inputs:
55
os:
66
required: true
7-
description: 'Operating system'
7+
description: "Operating system"
88
default: ubuntu-latest
99
node-version:
1010
required: true
11-
description: 'Node.js version'
12-
default: '24'
11+
description: "Node.js version"
12+
default: "24"
1313

1414
runs:
15-
using: 'composite'
15+
using: "composite"
1616
steps:
1717
- uses: pnpm/action-setup@v4
1818
with:
@@ -21,9 +21,9 @@ runs:
2121
- uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ inputs.node-version }}
24-
cache: 'pnpm'
25-
cache-dependency-path: '**/pnpm-lock.yaml'
26-
registry-url: 'https://registry.npmjs.org'
24+
cache: "pnpm"
25+
cache-dependency-path: "**/pnpm-lock.yaml"
26+
registry-url: "https://registry.npmjs.org"
2727
- name: Get pnpm store directory
2828
shell: bash
2929
run: |
@@ -34,5 +34,15 @@ runs:
3434
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
3535
restore-keys: |
3636
${{ runner.os }}-pnpm-store-
37-
- run: pnpm install --prefer-offline
37+
- name: Install dependencies in all workspaces
3838
shell: bash
39+
run: |
40+
echo "Installing dependencies in nx workspace..."
41+
cd nx && pnpm install --prefer-offline
42+
echo "Installing dependencies in vanilla workspace..."
43+
cd ../vanilla && pnpm install --prefer-offline
44+
echo "Installing dependencies in turborepo workspace..."
45+
cd ../turborepo && pnpm install --prefer-offline
46+
echo "Installing dependencies in scripts..."
47+
cd ../scripts && pnpm install --prefer-offline
48+
echo "✓ All dependencies installed"

.github/dependabot.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

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

Lines changed: 131 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,26 @@ on:
2424
type: string
2525
repository_dispatch:
2626
types: [build-deploy-test]
27+
pull_request:
28+
branches:
29+
- main
30+
paths:
31+
- "nx/**"
32+
- "vanilla/**"
33+
- "turborepo/**"
34+
- "scripts/**"
35+
- ".github/workflows/**"
36+
- ".github/actions/**"
37+
push:
38+
branches:
39+
- main
40+
paths:
41+
- "nx/**"
42+
- "vanilla/**"
43+
- "turborepo/**"
44+
- "scripts/**"
45+
- ".github/workflows/**"
46+
- ".github/actions/**"
2747

2848
env:
2949
NODE_VERSION: "24"
@@ -54,11 +74,36 @@ jobs:
5474
- name: Checkout
5575
uses: actions/checkout@v4
5676

57-
- uses: ./.github/actions/setup
77+
- uses: pnpm/action-setup@v4
78+
with:
79+
version: 10.6.3
80+
run_install: false
81+
82+
- uses: actions/setup-node@v4
5883
with:
5984
node-version: ${{ env.NODE_VERSION }}
85+
registry-url: "https://registry.npmjs.org"
86+
87+
- name: Get pnpm store directory
88+
shell: bash
89+
run: |
90+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
91+
92+
- name: Setup pnpm cache
93+
uses: actions/cache@v4
94+
with:
95+
path: ${{ env.STORE_PATH }}
96+
key: pnpm-store-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
97+
restore-keys: |
98+
pnpm-store-${{ runner.os }}-
99+
100+
- name: Install scripts dependencies
101+
run: |
102+
cd scripts
103+
pnpm install --prefer-offline
60104
61105
- name: Upgrade Zephyr plugins
106+
if: github.event_name != 'pull_request' && github.event_name != 'push'
62107
run: |
63108
cd scripts
64109
if [ -n "${{ github.event.inputs.plugin_version }}" ]; then
@@ -72,21 +117,98 @@ jobs:
72117
pnpm upgrade-plugins
73118
fi
74119
75-
- name: Install dependencies after upgrade
76-
run: pnpm install --prefer-offline
120+
- name: Install vanilla dependencies
121+
run: |
122+
cd vanilla
123+
pnpm install --prefer-offline
124+
125+
- name: Install nx example dependencies
126+
run: |
127+
cd nx/examples
128+
for example in */; do
129+
if [ -f "${example}package.json" ]; then
130+
echo "Installing dependencies for nx/${example}"
131+
cd "$example"
132+
pnpm install --prefer-offline
133+
cd ..
134+
fi
135+
done
136+
137+
- name: Install turborepo example dependencies
138+
run: |
139+
cd turborepo/examples
140+
for example in */; do
141+
if [ -f "${example}package.json" ]; then
142+
echo "Installing dependencies for turborepo/${example}"
143+
cd "$example"
144+
pnpm install --prefer-offline
145+
cd ..
146+
fi
147+
done
148+
149+
- name: Clean zephyr cache before build
150+
run: |
151+
echo "Cleaning $HOME/.zephyr directory..."
152+
if [ -d "$HOME/.zephyr" ]; then
153+
echo "Found existing .zephyr directory, checking contents:"
154+
ls -lah "$HOME/.zephyr/" || true
155+
echo "Removing .zephyr directory..."
156+
rm -rf "$HOME/.zephyr"
157+
fi
158+
echo "Creating fresh .zephyr directory..."
159+
mkdir -p "$HOME/.zephyr"
77160
78161
- name: Build all examples
79162
run: |
80163
cd scripts
81164
if [ "${{ github.event.inputs.skip_cache }}" == "true" ] || [ "${{ github.event.client_payload.skip_cache }}" == "true" ]; then
82-
echo "Building with --skip-cache flag"
83-
pnpm build-packages:force
165+
echo "Building all examples with --skip-cache flag"
166+
pnpm build-packages --skip-cache
84167
else
85-
echo "Building with cache enabled"
168+
echo "Building all examples with cache enabled"
86169
pnpm build-packages
87170
fi
88171
env:
89172
NODE_ENV: production
173+
ZE_SECRET_TOKEN: ${{ env.ZE_SECRET_TOKEN }}
174+
ZE_API_GATE: ${{ env.ZE_API_GATE }}
175+
ZE_API: ${{ env.ZE_API }}
176+
177+
- name: Check zephyr cache after build
178+
if: always()
179+
run: |
180+
echo "Checking $HOME/.zephyr after build..."
181+
if [ -d "$HOME/.zephyr" ]; then
182+
echo "Total files: $(ls -1 "$HOME/.zephyr" 2>/dev/null | wc -l)"
183+
echo "Checking for subdirectories that might cause EISDIR error:"
184+
find "$HOME/.zephyr" -type d 2>/dev/null || echo "No subdirectories found"
185+
echo ""
186+
echo "Files and directories in .zephyr:"
187+
ls -lah "$HOME/.zephyr/" 2>/dev/null | head -30 || echo "Cannot list directory"
188+
else
189+
echo "$HOME/.zephyr does not exist"
190+
fi
191+
192+
- name: Upload build logs
193+
uses: actions/upload-artifact@v4
194+
if: always()
195+
with:
196+
name: build-logs
197+
path: scripts/tmp/build/
198+
retention-days: 3
199+
200+
- name: Check zephyr cache contents
201+
run: |
202+
echo "Checking $HOME/.zephyr directory..."
203+
if [ -d "$HOME/.zephyr" ]; then
204+
echo "Files and directories in .zephyr:"
205+
ls -lah "$HOME/.zephyr/" | head -30
206+
echo ""
207+
echo "Checking for subdirectories:"
208+
find "$HOME/.zephyr" -type d | head -10
209+
else
210+
echo "$HOME/.zephyr does not exist"
211+
fi
90212
91213
- name: Wait for deployments to be ready
92214
run: |
@@ -104,6 +226,9 @@ jobs:
104226
pnpm test
105227
env:
106228
CI: true
229+
ZE_SECRET_TOKEN: ${{ env.ZE_SECRET_TOKEN }}
230+
ZE_API_GATE: ${{ env.ZE_API_GATE }}
231+
ZE_API: ${{ env.ZE_API }}
107232

108233
- name: Upload test results
109234
uses: actions/upload-artifact@v4
@@ -114,12 +239,3 @@ jobs:
114239
scripts/test-results/
115240
scripts/playwright-report/
116241
retention-days: 7
117-
118-
- name: Upload build logs
119-
uses: actions/upload-artifact@v4
120-
if: always()
121-
with:
122-
name: build-logs
123-
path: |
124-
scripts/tmp/build/
125-
retention-days: 3

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

0 commit comments

Comments
 (0)