Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@ on:
branches:
- main

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint-format:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
node-version: "20"
cache: yarn
cache-dependency-path: "yarn.lock"

- name: Ensure Yarn v1.22+
run: npm i -g yarn@^1.22.0 && yarn --version

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -29,5 +42,45 @@ jobs:
- name: Run Lint-Staged (Prettier & ESLint)
run: yarn lint-staged

- name: Run lint:check
run: yarn lint:check

- name: Run Commitlint on Last Commit
if: github.event_name == 'pull_request'
run: git log -1 --pretty=format:%s | npx --no -- commitlint

e2e-web:
name: Web E2E (headless)
runs-on: ubuntu-latest
needs: lint-format
if: github.event_name == 'pull_request' && (github.event.action == 'ready_for_review' || github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
cache-dependency-path: "yarn.lock"

- name: Ensure Yarn v1.22+
run: npm i -g yarn@^1.22.0 && yarn --version

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Run Web E2E Tests
run: yarn workspace web cy:e2e-headless
env:
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress
CI: true
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ yarn cypress-e2e-headless-test

### 🚀 Overview

Added comprehensive end-to-end testing using **WebdriverIO** for the wallet application, covering:
Added comprehensive end-to-end testing using **WebdriverIO** for the wallet
application, covering:

* ✅ **Login flow** (success & failure cases)
* ✅ **Wallet creation** process
* ✅ **User registration** workflow
* and more
- ✅ **Login flow** (success & failure cases)
- ✅ **Wallet creation** process
- ✅ **User registration** workflow
- and more

-----
---

### 🧪 Test Commands

Expand All @@ -100,7 +101,7 @@ yarn bdd:e2e:debug
yarn bdd:e2e:update-driver
```

-----
---

### 🖼️ Test Evidence

Expand All @@ -115,17 +116,17 @@ $ yarn test:e2e
[chrome] ✔ Registration - Email signup (5.8s)
```

-----
---

### ✅ Verification Checklist

* All tests pass locally (`yarn test:e2e`)
* No production code modified
* Test data follows PII guidelines
* ChromeDriver version (v136) matches CI
* Documentation updated if needed
- All tests pass locally (`yarn test:e2e`)
- No production code modified
- Test data follows PII guidelines
- ChromeDriver version (v136) matches CI
- Documentation updated if needed

-----
---

### ⚠️ Requirements

Expand All @@ -137,8 +138,6 @@ yarn workspace web dev

Also, ensure you have Chrome v136+ installed.



## 🏗️ Project Structure

```
Expand Down Expand Up @@ -227,13 +226,14 @@ yarn test
# Lint and format
yarn lint:fix
```

## How to set up: lint, code format, Typescript for a new package/app

Follow this PR too add shared configuration package to standardize linting, formatting, and TypeScript setup across the project.
Follow this PR too add shared configuration package to standardize linting,
formatting, and TypeScript setup across the project.

https://github.com/Greenstand/treetracker-wallet-app/pull/537/files


## 🤝 Contributing

We welcome contributions! Whether you're fixing bugs, adding features, or
Expand Down
Loading