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
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Default owners for everything
* @aws/bedrock-agentcore-maintainers

# Python code
*.py @aws/bedrock-agentcore-python-reviewers

# Documentation
*.md @aws/bedrock-agentcore-docs-reviewers
/docs/ @aws/bedrock-agentcore-docs-reviewers

# CI/CD
/.github/ @aws/bedrock-agentcore-devops

# Wheelhouse (custom dependencies)
/wheelhouse/ @aws/bedrock-agentcore-security
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "03:00"
open-pull-requests-limit: 10
reviewers:
- "aws/bedrock-agentcore-maintainers"
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore"
include: "scope"
ignore:
- dependency-name: "boto3"
- dependency-name: "botocore"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "03:00"
open-pull-requests-limit: 5
reviewers:
- "aws/bedrock-agentcore-maintainers"
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"
143 changes: 143 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI/CD Pipeline

on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]

permissions:
contents: read
checks: write
pull-requests: write

jobs:
lint:
name: Lint and Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

# Add virtual environment creation
- name: Create virtual environment
run: uv venv

- name: Install dependencies with uv
run: |
uv sync --dev

- name: Run pre-commit
run: uv run pre-commit run --all-files

test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

# Add virtual environment creation
- name: Create virtual environment
run: uv venv

- name: Install dependencies with uv
run: |
uv sync --dev

- name: Run tests with coverage
run: |
uv run pytest tests/ --cov=src --cov-report=xml --cov-report=html --cov-fail-under=56

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

build:
name: Build Distribution
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

# Add virtual environment creation
- name: Create virtual environment
run: uv venv

- name: Build package with uv
run: |
uv build

- name: Check package
run: |
uv pip install twine
uv run twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

test-install:
name: Test Package Installation
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Install from wheel
run: |
pip install dist/*.whl
python -c "from bedrock_agentcore import BedrockAgentCoreApp; print('Import successful')"
48 changes: 48 additions & 0 deletions .github/workflows/dependency-management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Dependency Management

on:
schedule:
- cron: '0 3 * * *'
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
# Skip dependency-review - requires GitHub Advanced Security
license-check:
name: License Compatibility Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install dependencies
run: |
uv sync
uv pip install pip-licenses

- name: Check licenses
run: |
uv run pip-licenses --format=json --output-file=licenses.json
uv run pip-licenses --fail-on="GPL;LGPL;AGPL;SSPL" || true

- name: Upload license report
uses: actions/upload-artifact@v4
with:
name: license-report
path: licenses.json
122 changes: 122 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Release to PyPI

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
test_release:
description: 'Test release (TestPyPI only)'
required: true
default: 'true'
type: choice
options:
- 'true'
- 'false'

permissions:
contents: write
id-token: write

jobs:
build:
name: Build Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

# Add virtual environment creation
- name: Create virtual environment
run: uv venv

- name: Build package
run: uv build

- name: Check package
run: |
uv pip install twine
uv run twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

test-pypi:
name: Upload to TestPyPI
needs: build
runs-on: ubuntu-latest
environment:
name: test-pypi
url: https://test.pypi.org/project/bedrock-agentcore/

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

pypi:
name: Upload to PyPI
needs: test-pypi
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.inputs.test_release == 'false'
environment:
name: pypi
url: https://pypi.org/project/bedrock-agentcore/

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

github-release:
name: Create GitHub Release
needs: pypi
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
draft: false
prerelease: false
Loading
Loading