Adds missing standard artifacts: - README.md (if missing) - AGENTS.md (AI agent contract) - PLAN.md (current sprint) - STATUS.md (where we are) - DEVELOPMENT.md (dev workflow) - DEPLOYMENT.md (deploy procedure) - TESTING.md (test strategy) - DECISIONS.md (ADR index + templates) - .github/CODEOWNERS - .github/workflows/ci.yml Preserves all existing artifacts. Refs: RugMunchMedia/fleet-template
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
WP_ADMIN_KEY: ci-admin-key-for-testing
|
|
WP_VAULT_PASSWORD: ci-vault-password-for-testing
|
|
WP_DATA_DIR: /tmp/wp_ci_data
|
|
WP_RATE_LIMIT: "0"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.lock
|
|
pip install ruff mypy
|
|
- name: Ruff lint
|
|
run: ruff check .
|
|
- name: Ruff format check
|
|
run: ruff format --check .
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.lock
|
|
- name: Run tests
|
|
run: python3 -m pytest tests/ -v --tb=short --timeout=120
|
|
|
|
security:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install bandit gitleaks
|
|
- name: Bandit
|
|
run: bandit -r . -x tests
|
|
- name: Gitleaks
|
|
uses: gitleaks/gitleaks-action@v2
|