Skip to content

Commit 80cc901

Browse files
committed
merge: integrate pnpm migration into main
2 parents 48901b9 + 076e519 commit 80cc901

3 files changed

Lines changed: 98 additions & 9 deletions

File tree

.github/workflows/cypress-e2e.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Cypress E2E
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
e2e:
11+
name: Cypress E2E
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v5
20+
with:
21+
node-version: 22
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 11.5.0
27+
28+
- name: Get pnpm store path
29+
run: echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"
30+
31+
- name: Restore pnpm cache
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ env.PNPM_STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Build production app
43+
run: pnpm run build
44+
45+
- name: Start Angular dev server
46+
run: |
47+
pnpm start --host 127.0.0.1 --port 4200 > angular-server.log 2>&1 &
48+
echo $! > angular-server.pid
49+
50+
- name: Wait for Angular dev server
51+
run: |
52+
for i in {1..90}; do
53+
if curl --silent --fail http://127.0.0.1:4200 > /dev/null; then
54+
exit 0
55+
fi
56+
sleep 1
57+
done
58+
cat angular-server.log
59+
exit 1
60+
61+
- name: Run Cypress E2E
62+
run: pnpm run e2e

.github/workflows/deploy-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: pnpm test --watch=false
4444

4545
- name: Build Angular app
46-
run: pnpm run build -- --configuration production --base-href /${{ github.event.repository.name }}/
46+
run: pnpm run build --configuration production --base-href /${{ github.event.repository.name }}/
4747

4848
- name: Add SPA fallback
4949
run: cp dist/devbreak-timer/browser/index.html dist/devbreak-timer/browser/404.html

README.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FocusFlow combines a focus timer, Pomodoro workflows, Kanban planning, and light
99
![Angular](https://img.shields.io/badge/Angular-21-DD0031?style=flat-square&logo=angular&logoColor=white)
1010
![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178C6?style=flat-square&logo=typescript&logoColor=white)
1111
![RxJS](https://img.shields.io/badge/RxJS-7.8-B7178C?style=flat-square&logo=reactivex&logoColor=white)
12+
![pnpm](https://img.shields.io/badge/pnpm-11-F69220?style=flat-square&logo=pnpm&logoColor=white)
1213
![PWA](https://img.shields.io/badge/PWA-Installable-5A0FC8?style=flat-square)
1314
![Cypress](https://img.shields.io/badge/Cypress-E2E-17202C?style=flat-square&logo=cypress&logoColor=white)
1415
![i18n](https://img.shields.io/badge/i18n-EN%20%7C%20ES%20%7C%20FR-2563EB?style=flat-square)
@@ -127,13 +128,13 @@ Architecture highlights:
127128
Install dependencies:
128129

129130
```bash
130-
npm install
131+
pnpm install
131132
```
132133

133134
Run the local development server:
134135

135136
```bash
136-
npm start
137+
pnpm start
137138
```
138139

139140
Open:
@@ -145,21 +146,23 @@ http://localhost:4200/
145146
Create a production build:
146147

147148
```bash
148-
npm run build
149+
pnpm run build
149150
```
150151

151152
Run unit tests:
152153

153154
```bash
154-
npm test -- --watch=false
155+
pnpm test --watch=false
155156
```
156157

157158
Run Cypress:
158159

159160
```bash
160-
npm run e2e
161+
pnpm run e2e
161162
```
162163

164+
> On local Windows shells, make sure `ELECTRON_RUN_AS_NODE` is not set before launching Cypress.
165+
163166
## PWA Support
164167

165168
FocusFlow is configured as an Angular PWA for production builds.
@@ -201,13 +204,26 @@ Deployment profile:
201204
Recommended release checks:
202205

203206
```bash
204-
npm ci
205-
npm run build
206-
npm test -- --watch=false
207+
pnpm install --frozen-lockfile
208+
pnpm run build
209+
pnpm test --watch=false
210+
pnpm run e2e
207211
```
208212

209213
For PWA behavior, validate installability and offline reload from a production build over HTTPS or localhost.
210214

215+
## CI/CD
216+
217+
GitHub Actions uses Node 22 and pnpm 11. The main CI workflow installs dependencies with `pnpm install --frozen-lockfile`, runs unit tests with `pnpm test --watch=false`, and builds the production app with `pnpm run build`.
218+
219+
The GitHub Pages deployment workflow also uses pnpm and builds with the repository base href:
220+
221+
```bash
222+
pnpm run build --configuration production --base-href /FocusFlow/
223+
```
224+
225+
The Cypress E2E workflow starts the Angular dev server with pnpm and runs the Cypress suite against `http://127.0.0.1:4200`.
226+
211227
## Future Improvements
212228

213229
The current app is complete as a local-first PWA. Realistic future additions could include:
@@ -255,3 +271,14 @@ FocusFlow running from the public production deployment.
255271
Installed Android PWA experience.
256272

257273
![FocusFlow Mobile PWA](./screenshots/focusflow-mobile-pwa.png)
274+
275+
---
276+
277+
## Screenshot Folder Structure
278+
279+
```text
280+
screenshots/
281+
focusflow-desktop.png
282+
focusflow-web.png
283+
focusflow-mobile-pwa.png
284+
```

0 commit comments

Comments
 (0)