add brain
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Deployment Gates
|
||||
|
||||
## Minimum Gate Policy
|
||||
|
||||
- `lint` must pass before `test`.
|
||||
- `test` must pass before `build`.
|
||||
- `build` artifact required for deploy jobs.
|
||||
- Production deploy requires manual approval and protected branch.
|
||||
|
||||
## Environment Pattern
|
||||
|
||||
- `develop` -> auto deploy to staging
|
||||
- `main` -> manual promote to production
|
||||
|
||||
## Rollback Requirement
|
||||
|
||||
Every deploy job should define a rollback command or procedure reference.
|
||||
@@ -0,0 +1,41 @@
|
||||
# GitHub Actions Templates
|
||||
|
||||
## Node.js Baseline
|
||||
|
||||
```yaml
|
||||
name: Node CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
```
|
||||
|
||||
## Python Baseline
|
||||
|
||||
```yaml
|
||||
name: Python CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- run: python3 -m pip install -U pip
|
||||
- run: python3 -m pip install -r requirements.txt
|
||||
- run: python3 -m pytest
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
# GitLab CI Templates
|
||||
|
||||
## Node.js Baseline
|
||||
|
||||
```yaml
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
- build
|
||||
|
||||
node_lint:
|
||||
image: node:20
|
||||
stage: lint
|
||||
script:
|
||||
- npm ci
|
||||
- npm run lint
|
||||
|
||||
node_test:
|
||||
image: node:20
|
||||
stage: test
|
||||
script:
|
||||
- npm ci
|
||||
- npm test
|
||||
```
|
||||
|
||||
## Python Baseline
|
||||
|
||||
```yaml
|
||||
stages:
|
||||
- test
|
||||
|
||||
python_test:
|
||||
image: python:3.12
|
||||
stage: test
|
||||
script:
|
||||
- python3 -m pip install -U pip
|
||||
- python3 -m pip install -r requirements.txt
|
||||
- python3 -m pytest
|
||||
```
|
||||
Reference in New Issue
Block a user