Skip to content
Open

1.0 #54

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
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Bug
about: Plan and track a bug fix slice
title: "Bug: "
labels: ["type:bug"]
assignees: []
---

## Goal
<!-- One short statement of the user-visible bug impact -->

## Scope
<!-- In scope:
- Bug source analysis
- Code fix
- Required test updates
-->

## Branch
`bug/<bugfix>`

## Bug Details
### Current Behavior
<!-- What happens today? -->

### Expected Behavior
<!-- What should happen instead? -->

### Steps to Reproduce
1. ...
2. ...
3. ...

## Acceptance Criteria
- [ ] Root cause is identified and fixed.
- [ ] Behavior matches expected result in affected flow.
- [ ] No regression is introduced in related flow.

## Test Checklist
### Unit
- [ ] Add or update unit tests for the bug scenario.

### Integration
- [ ] Add or update integration tests if cross-component behavior changed.

### E2E
- [ ] Add or update E2E coverage when user flow is affected.

### Manual
- [ ] Reproduce bug on current main/develop baseline.
- [ ] Verify fix with same repro steps after patch.

## Notes
<!-- Optional context, links, decisions -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions and support
url: https://github.com/mjkatgithub/Decentra/discussions
about: Please ask questions in Discussions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Epic
about: Group related feature issues under one milestone goal
title: "Epic: "
labels: ["type:epic"]
assignees: []
---

## Goal
<!-- What business/product outcome should this epic deliver? -->

## Scope
- [ ] Feature issue 1
- [ ] Feature issue 2
- [ ] Feature issue 3

## Definition of Done
- [ ] All feature issues are created and linked as sub-issues
- [ ] All feature issues are assigned to the same milestone
- [ ] All feature issues are added to the project board
- [ ] Every feature issue has acceptance criteria and test checklist

## Notes
<!-- Optional constraints, dependencies, risks -->
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature
about: Plan and implement a feature slice
title: "Feature: "
labels: ["type:feature"]
assignees: []
---

## Goal
<!-- One short statement of the user value -->

## Scope
<!-- In scope:
- ...
-->

## Branch
`feature/<feature>` (Feature)

## Acceptance Criteria
- [ ] ...
- [ ] ...
- [ ] ...

## Test Checklist
### Unit
- [ ] ...

### Integration
- [ ] ...

### E2E
- [ ] ...

## Notes
<!-- Optional context, links, decisions -->
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Summary
<!-- What and why -->

## Related Issue
<!-- Example: Closes #123 -->

## Branch Flow
- Source branch: `feature/<feature>` or `bug/<bugfix>`
- Target branch: `develop`

## Scope of Changes
- [ ] Code changes are limited to the issue scope
- [ ] No unrelated refactors are included

## Validation
### Local checks
- [ ] Unit tests pass
- [ ] Integration tests pass (if relevant)
- [ ] E2E smoke passes (if relevant)

### Manual test
- [ ] Happy path verified
- [ ] Edge cases verified

## Risk and Rollback
- Risk level: [ ] Low [ ] Medium [ ] High
- Rollback plan:
- Revert this PR
- Disable affected feature path if needed

## Checklist
- [ ] Issue is linked and updated
- [ ] Acceptance criteria are met
- [ ] Test checklist in the issue is completed
- [ ] No secrets or credentials are included
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Release Summary
<!-- Describe the release intent and scope -->

## Branch Flow
- Source branch: `develop`
- Target branch: `master`

## Included Work
- [ ] Milestone completed (example: Phase 3)
- [ ] Linked feature/bug PRs are merged into `develop`
- [ ] Release notes draft is prepared

## Compatibility and Risk
- Breaking changes: [ ] No [ ] Yes (describe below)
- Migration required: [ ] No [ ] Yes (describe below)
- Risk level: [ ] Low [ ] Medium [ ] High

### Breaking changes / migration notes
<!-- Add details or write N/A -->

## Validation
### Pre-release checks
- [ ] CI pipelines passed on `develop`
- [ ] Smoke tests passed
- [ ] Critical user flows validated manually

### Post-merge plan
- [ ] Verify production/staging health
- [ ] Monitor logs and error tracking
- [ ] Prepare rollback if required

## Rollback Plan
- Revert release merge commit on `master`
- Hotfix from `master` if partial rollback is needed

## Checklist
- [ ] CHANGELOG updated
- [ ] Version/tag strategy confirmed
- [ ] Stakeholder communication prepared
88 changes: 88 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Changelog Check

on:
pull_request:
branches:
- develop
- master

jobs:
changelog:
name: Changelog policy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Enforce changelog policy by target branch
run: |
set -euo pipefail

BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
BASE_REF="${{ github.base_ref }}"
HEAD_REF="${{ github.head_ref }}"

if ! git diff --name-only "$BASE_SHA" "$HEAD_SHA" | \
grep -q '^CHANGELOG.md$'; then
echo "ERROR: CHANGELOG.md was not updated."
exit 1
fi

extract_unreleased() {
awk '
/^## \[Unreleased\]/ { in_section=1; next }
/^## \[/ { if (in_section) exit }
in_section { print }
'
}

count_entries() {
grep -E -c '^[[:space:]]*-[[:space:]]+' || true
}

BASE_UNRELEASED="$(git show "$BASE_SHA:CHANGELOG.md" | \
extract_unreleased)"
HEAD_UNRELEASED="$(git show "$HEAD_SHA:CHANGELOG.md" | \
extract_unreleased)"

BASE_COUNT="$(printf '%s\n' "$BASE_UNRELEASED" | count_entries)"
HEAD_COUNT="$(printf '%s\n' "$HEAD_UNRELEASED" | count_entries)"

if [ "$BASE_REF" = "develop" ]; then
# Feature/Bug/etc -> develop:
# PR must add at least one Unreleased entry.
if [ "$HEAD_COUNT" -le "$BASE_COUNT" ]; then
echo "ERROR: PR into develop must add an Unreleased entry."
echo "Base Unreleased entries: $BASE_COUNT"
echo "Head Unreleased entries: $HEAD_COUNT"
exit 1
fi

echo "OK: Unreleased entries increased ($BASE_COUNT -> $HEAD_COUNT)."
exit 0
fi

if [ "$BASE_REF" = "master" ] && [ "$HEAD_REF" = "develop" ]; then
# develop -> master:
# Unreleased must be empty and a new version section must be added.
if [ "$HEAD_COUNT" -ne 0 ]; then
echo "ERROR: develop -> master requires empty Unreleased section."
echo "Current Unreleased entries: $HEAD_COUNT"
exit 1
fi

if ! git diff "$BASE_SHA" "$HEAD_SHA" -- CHANGELOG.md | \
grep -E '^\+\#\# \[[0-9]+\.[0-9]+\.[0-9]+\] - '; then
echo "ERROR: No new version section found in CHANGELOG.md."
exit 1
fi

echo "OK: Release changelog structure is valid."
exit 0
fi

# For other PR routes, require changelog file change only.
echo "OK: CHANGELOG.md updated for this PR route."
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- develop
- master
- feature/**
pull_request:
branches:
- develop
- master
workflow_dispatch:
inputs:
run_full:
description: Run full pipeline (coverage + full E2E)
required: false
type: boolean
default: false
schedule:
- cron: '0 2 * * *'

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
fast:
name: Fast lane (unit + integration + e2e smoke)
runs-on: ubuntu-latest
if: >
(github.event_name == 'push' && github.ref != 'refs/heads/master') ||
(github.event_name == 'pull_request' && github.base_ref != 'master') ||
(github.event_name == 'workflow_dispatch' && inputs.run_full != true)

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

- name: Install Playwright browser and system deps
run: npx playwright install --with-deps chromium

- name: Run fast CI lane
run: npm run test:ci:fast

full:
name: Full lane (coverage + full e2e)
runs-on: ubuntu-latest
if: >
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'pull_request' && github.base_ref == 'master') ||
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' &&
inputs.run_full == true)

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

- name: Install Playwright browser and system deps
run: npx playwright install --with-deps chromium

- name: Verify Docker availability
run: docker --version

- name: Run full CI lane
run: npm run test:ci:full
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ logs
.DS_Store
.fleet
.idea
coverage
coverage/
tests/e2e/reports
tests/e2e/reports/

# Local env files
.env
.env.*
!.env.example
!tests/e2e/.env.e2e.example
1 change: 0 additions & 1 deletion .nuxtrc

This file was deleted.

Loading
Loading