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
2 changes: 1 addition & 1 deletion .github/workflows/branch-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'

- name: Install commitlint
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: 'npm'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version: "22"
cache: 'npm'

- name: Install dependencies
Expand Down
128 changes: 64 additions & 64 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
name: Test Workflow
on:
# Allows manual trigger from Actions tab
workflow_dispatch:
# For testing on pull requests to develop branch
pull_request:
branches: [ develop ]
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
# - name: Run tests
# run: |
# echo "Running tests..."
# npm run test
- name: Check build
run: |
echo "Checking build..."
npm run build
# Test changelog generation
- name: Test changelog
run: |
echo "Testing changelog generation..."
npm run changelog
# - name: Test commit lint
# run: |
# echo "Testing last commit message..."
# echo "$(git log -1 --pretty=%B)" | npx commitlint
- name: Status Check
run: |
echo "All tests completed successfully!"
- name: Debug
if: ${{ failure() }}
run: |
echo "Debug information:"
env
ls -la
- name: Check Status
run: |
if [ $? -eq 0 ]; then
echo "::set-output name=status::success"
else
echo "::set-output name=status::failure"
exit 1
name: Test Workflow

on:
# Allows manual trigger from Actions tab
workflow_dispatch:
# For testing on pull requests to develop branch
pull_request:
branches: [ develop ]
types: [opened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: npm ci

# - name: Run tests
# run: |
# echo "Running tests..."
# npm run test

- name: Check build
run: |
echo "Checking build..."
npm run build

# Test changelog generation
- name: Test changelog
run: |
echo "Testing changelog generation..."
npm run changelog

# - name: Test commit lint
# run: |
# echo "Testing last commit message..."
# echo "$(git log -1 --pretty=%B)" | npx commitlint

- name: Status Check
run: |
echo "All tests completed successfully!"

- name: Debug
if: ${{ failure() }}
run: |
echo "Debug information:"
env
ls -la

- name: Check Status
run: |
if [ $? -eq 0 ]; then
echo "::set-output name=status::success"
else
echo "::set-output name=status::failure"
exit 1
fi
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
12 changes: 6 additions & 6 deletions CLOUDFLARE_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide covers deploying the COC Website to Cloudflare Pages using `@cloudfla

## Prerequisites

- Node.js >= 20.0.0 (check with `node -v`)
- Node.js >= 22.0.0 (check with `node -v`)
- Cloudflare account
- Wrangler CLI installed (`npm install -g wrangler`)

Expand Down Expand Up @@ -91,17 +91,17 @@ For non-secret variables, add them in the Cloudflare Pages dashboard:
2. Navigate to **Environment variables**
3. Add:
- `NEXT_OUTPUT_STANDALONE` = `false`
- `NODE_VERSION` = `20`
- `NODE_VERSION` = `22`

## Troubleshooting

### Build Fails with "Unsupported engine"

Ensure you're using Node.js >= 20.0.0:
Ensure you're using Node.js >= 22.0.0:

```bash
node -v # Should show v20.x.x or higher
nvm use 20 # If using nvm
node -v # Should show v22.x.x or higher
nvm use 22 # If using nvm
```

### Missing Secrets
Expand Down Expand Up @@ -152,7 +152,7 @@ compatibility_date = "2025-01-01"
command = "npx @cloudflare/next-on-pages@1"

[vars]
NODE_VERSION = "20"
NODE_VERSION = "22"
NEXT_OUTPUT_STANDALONE = "false"
```

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Dependencies
FROM node:20-alpine AS deps
FROM node:22-alpine AS deps
WORKDIR /app

# Install dependencies needed for build
Expand All @@ -12,7 +12,7 @@ COPY package*.json ./
RUN npm ci --ignore-scripts

# Stage 2: Builder
FROM node:20-alpine AS builder
FROM node:22-alpine AS builder
WORKDIR /app

# Copy dependencies from deps stage
Expand All @@ -38,7 +38,7 @@ ENV JWT_SECRET=placeholder_for_build
RUN npm run build

# Stage 3: Production image
FROM node:20-alpine AS runner
FROM node:22-alpine AS runner
WORKDIR /app

# Set environment variables
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Open [http://localhost:3000](http://localhost:3000) to view the project.
## 🛠️ Development Setup

### Prerequisites
- Node.js (v18 or higher)
- npm (v9 or higher)
- Node.js (v22 or higher)
- npm (v10 or higher)
- Docker (optional)

### Environment Setup
Expand Down
Loading
Loading