Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches: [main, develop, 'perf/**', 'feat/**', 'fix/**']
pull_request:
branches: [main, develop]

jobs:
ci:
name: Type Check · Lint · Test · Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

# ── Static Analysis ───────────────────────────────────────────────────
- name: Type check
run: npm run type-check

- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check

# ── Unit Tests ────────────────────────────────────────────────────────
- name: Unit tests
run: npm run test

# ── Build ─────────────────────────────────────────────────────────────
# Validates that Tailwind purges correctly and no runtime CSS fallbacks
# are needed. A failed build here catches missing class issues early.
- name: Build
run: npm run build
env:
# Provide stub values so next build doesn't fail on missing env vars
NEXTAUTH_SECRET: ci-stub-secret
NEXTAUTH_URL: http://localhost:3000
NEXT_PUBLIC_API_BASE_URL: http://localhost:4000
50 changes: 28 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,32 @@ Thank you for your interest in contributing to StellarAid! This guide will help
1. **Fork the repository** on GitHub.

2. **Clone your fork:**

```bash
git clone https://github.com/<your-username>/stellarAid-web.git
cd stellarAid-web
```

3. **Add upstream remote:**

```bash
git remote add upstream https://github.com/Dfunder/stellarAid-web.git
```

4. **Install dependencies:**

```bash
npm install
```

5. **Copy the environment file:**

```bash
cp .env.example .env.local
```

6. **Start the development server:**

```bash
npm run dev
```
Expand All @@ -59,16 +64,16 @@ Thank you for your interest in contributing to StellarAid! This guide will help

### Useful Scripts

| Command | Description |
|---------|-------------|
| `npm run dev` | Start development server |
| `npm run build` | Production build |
| `npm run lint` | Run ESLint |
| `npm run type-check` | Run TypeScript type checking |
| `npm run test` | Run unit tests with Vitest |
| `npm run test:watch` | Run tests in watch mode |
| `npm run format` | Format code with Prettier |
| `npm run cypress:open` | Open Cypress E2E tests |
| Command | Description |
| ---------------------- | ---------------------------- |
| `npm run dev` | Start development server |
| `npm run build` | Production build |
| `npm run lint` | Run ESLint |
| `npm run type-check` | Run TypeScript type checking |
| `npm run test` | Run unit tests with Vitest |
| `npm run test:watch` | Run tests in watch mode |
| `npm run format` | Format code with Prettier |
| `npm run cypress:open` | Open Cypress E2E tests |

---

Expand Down Expand Up @@ -138,13 +143,13 @@ stellarAid-web/

Use descriptive branch names with the following prefixes:

| Prefix | Usage | Example |
|--------|-------|---------|
| `feat/` | New features | `feat/dark-mode-toggle` |
| `fix/` | Bug fixes | `fix/wallet-balance-refresh` |
| `chore/` | Maintenance tasks | `chore/update-dependencies` |
| `docs/` | Documentation | `docs/api-reference` |
| `refactor/` | Code refactoring | `refactor/commission-hooks` |
| Prefix | Usage | Example |
| ----------- | ----------------- | ---------------------------- |
| `feat/` | New features | `feat/dark-mode-toggle` |
| `fix/` | Bug fixes | `fix/wallet-balance-refresh` |
| `chore/` | Maintenance tasks | `chore/update-dependencies` |
| `docs/` | Documentation | `docs/api-reference` |
| `refactor/` | Code refactoring | `refactor/commission-hooks` |

---

Expand Down Expand Up @@ -213,11 +218,7 @@ export default function MyComponent({ title, onSelect }: MyComponentProps) {
// Effects
// Handlers
// Render
return (
<div className="...">
{/* Content */}
</div>
);
return <div className="...">{/* Content */}</div>;
}
```

Expand All @@ -235,12 +236,14 @@ export default function MyComponent({ title, onSelect }: MyComponentProps) {
### Before Submitting

1. **Sync with upstream:**

```bash
git fetch upstream
git rebase upstream/main
```

2. **Run checks:**

```bash
npm run lint
npm run type-check
Expand Down Expand Up @@ -268,13 +271,16 @@ export default function MyComponent({ title, onSelect }: MyComponentProps) {

```markdown
## Summary

Brief description of changes.

## Changes

- Change 1
- Change 2

## Testing

How to test these changes.

Closes #issue_number
Expand Down
Loading
Loading