Skip to content

Commit 4f5c80d

Browse files
authored
migrate from staging
1 parent 2843c9a commit 4f5c80d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+16458
-51
lines changed

.github/CODEOWNERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Default owners for everything
2+
* @aws/bedrock-agentcore-maintainers
3+
4+
# Python code
5+
*.py @aws/bedrock-agentcore-python-reviewers
6+
7+
# Documentation
8+
*.md @aws/bedrock-agentcore-docs-reviewers
9+
/docs/ @aws/bedrock-agentcore-docs-reviewers
10+
11+
# CI/CD
12+
/.github/ @aws/bedrock-agentcore-devops
13+
14+
# Wheelhouse (custom dependencies)
15+
/wheelhouse/ @aws/bedrock-agentcore-security

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "03:00"
9+
open-pull-requests-limit: 10
10+
reviewers:
11+
- "aws/bedrock-agentcore-maintainers"
12+
labels:
13+
- "dependencies"
14+
- "python"
15+
commit-message:
16+
prefix: "chore"
17+
include: "scope"
18+
ignore:
19+
- dependency-name: "boto3"
20+
- dependency-name: "botocore"
21+
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
day: "monday"
27+
time: "03:00"
28+
open-pull-requests-limit: 5
29+
reviewers:
30+
- "aws/bedrock-agentcore-maintainers"
31+
labels:
32+
- "dependencies"
33+
- "github-actions"
34+
commit-message:
35+
prefix: "ci"
36+
include: "scope"

.github/workflows/ci.yml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ main ]
10+
11+
permissions:
12+
contents: read
13+
checks: write
14+
pull-requests: write
15+
16+
jobs:
17+
lint:
18+
name: Lint and Format
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.10'
27+
28+
- name: Install uv
29+
run: |
30+
curl -LsSf https://astral.sh/uv/install.sh | sh
31+
echo "$HOME/.local/bin" >> $GITHUB_PATH
32+
33+
# Add virtual environment creation
34+
- name: Create virtual environment
35+
run: uv venv
36+
37+
- name: Install dependencies with uv
38+
run: |
39+
uv sync --dev
40+
41+
- name: Run pre-commit
42+
run: uv run pre-commit run --all-files
43+
44+
test:
45+
name: Test Python ${{ matrix.python-version }}
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
python-version: ['3.10', '3.11', '3.12', '3.13']
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Set up Python ${{ matrix.python-version }}
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: ${{ matrix.python-version }}
58+
59+
- name: Install uv
60+
run: |
61+
curl -LsSf https://astral.sh/uv/install.sh | sh
62+
echo "$HOME/.local/bin" >> $GITHUB_PATH
63+
64+
# Add virtual environment creation
65+
- name: Create virtual environment
66+
run: uv venv
67+
68+
- name: Install dependencies with uv
69+
run: |
70+
uv sync --dev
71+
72+
- name: Run tests with coverage
73+
run: |
74+
uv run pytest tests/ --cov=src --cov-report=xml --cov-report=html --cov-fail-under=56
75+
76+
- name: Upload coverage to Codecov
77+
uses: codecov/codecov-action@v4
78+
with:
79+
file: ./coverage.xml
80+
flags: unittests
81+
name: codecov-umbrella
82+
fail_ci_if_error: false
83+
84+
build:
85+
name: Build Distribution
86+
runs-on: ubuntu-latest
87+
needs: [lint, test]
88+
steps:
89+
- uses: actions/checkout@v4
90+
91+
- name: Set up Python
92+
uses: actions/setup-python@v5
93+
with:
94+
python-version: '3.10'
95+
96+
- name: Install uv
97+
run: |
98+
curl -LsSf https://astral.sh/uv/install.sh | sh
99+
echo "$HOME/.local/bin" >> $GITHUB_PATH
100+
101+
# Add virtual environment creation
102+
- name: Create virtual environment
103+
run: uv venv
104+
105+
- name: Build package with uv
106+
run: |
107+
uv build
108+
109+
- name: Check package
110+
run: |
111+
uv pip install twine
112+
uv run twine check dist/*
113+
114+
- name: Upload artifacts
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: dist
118+
path: dist/
119+
120+
test-install:
121+
name: Test Package Installation
122+
runs-on: ubuntu-latest
123+
needs: build
124+
strategy:
125+
matrix:
126+
python-version: ['3.10', '3.11', '3.12', '3.13']
127+
128+
steps:
129+
- name: Set up Python ${{ matrix.python-version }}
130+
uses: actions/setup-python@v5
131+
with:
132+
python-version: ${{ matrix.python-version }}
133+
134+
- name: Download artifacts
135+
uses: actions/download-artifact@v4
136+
with:
137+
name: dist
138+
path: dist/
139+
140+
- name: Install from wheel
141+
run: |
142+
pip install dist/*.whl
143+
python -c "from bedrock_agentcore import BedrockAgentCoreApp; print('Import successful')"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Dependency Management
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * *'
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
permissions:
12+
contents: read
13+
issues: write
14+
pull-requests: write
15+
16+
jobs:
17+
# Skip dependency-review - requires GitHub Advanced Security
18+
license-check:
19+
name: License Compatibility Check
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.10'
28+
29+
- name: Install uv
30+
run: |
31+
curl -LsSf https://astral.sh/uv/install.sh | sh
32+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
33+
34+
- name: Install dependencies
35+
run: |
36+
uv sync
37+
uv pip install pip-licenses
38+
39+
- name: Check licenses
40+
run: |
41+
uv run pip-licenses --format=json --output-file=licenses.json
42+
uv run pip-licenses --fail-on="GPL;LGPL;AGPL;SSPL" || true
43+
44+
- name: Upload license report
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: license-report
48+
path: licenses.json

.github/workflows/release.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Release to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
test_release:
10+
description: 'Test release (TestPyPI only)'
11+
required: true
12+
default: 'true'
13+
type: choice
14+
options:
15+
- 'true'
16+
- 'false'
17+
18+
permissions:
19+
contents: write
20+
id-token: write
21+
22+
jobs:
23+
build:
24+
name: Build Release
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.10'
33+
34+
- name: Install uv
35+
run: |
36+
curl -LsSf https://astral.sh/uv/install.sh | sh
37+
echo "$HOME/.local/bin" >> $GITHUB_PATH
38+
39+
# Add virtual environment creation
40+
- name: Create virtual environment
41+
run: uv venv
42+
43+
- name: Build package
44+
run: uv build
45+
46+
- name: Check package
47+
run: |
48+
uv pip install twine
49+
uv run twine check dist/*
50+
51+
- name: Upload artifacts
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: dist
55+
path: dist/
56+
57+
test-pypi:
58+
name: Upload to TestPyPI
59+
needs: build
60+
runs-on: ubuntu-latest
61+
environment:
62+
name: test-pypi
63+
url: https://test.pypi.org/project/bedrock-agentcore/
64+
65+
steps:
66+
- name: Download artifacts
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: dist
70+
path: dist/
71+
72+
- name: Publish to TestPyPI
73+
uses: pypa/gh-action-pypi-publish@release/v1
74+
with:
75+
repository-url: https://test.pypi.org/legacy/
76+
skip-existing: true
77+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
78+
79+
pypi:
80+
name: Upload to PyPI
81+
needs: test-pypi
82+
runs-on: ubuntu-latest
83+
if: github.event_name == 'push' || github.event.inputs.test_release == 'false'
84+
environment:
85+
name: pypi
86+
url: https://pypi.org/project/bedrock-agentcore/
87+
88+
steps:
89+
- name: Download artifacts
90+
uses: actions/download-artifact@v4
91+
with:
92+
name: dist
93+
path: dist/
94+
95+
- name: Publish to PyPI
96+
uses: pypa/gh-action-pypi-publish@release/v1
97+
with:
98+
password: ${{ secrets.PYPI_API_TOKEN }}
99+
100+
github-release:
101+
name: Create GitHub Release
102+
needs: pypi
103+
runs-on: ubuntu-latest
104+
permissions:
105+
contents: write
106+
107+
steps:
108+
- uses: actions/checkout@v4
109+
110+
- name: Download artifacts
111+
uses: actions/download-artifact@v4
112+
with:
113+
name: dist
114+
path: dist/
115+
116+
- name: Create Release
117+
uses: softprops/action-gh-release@v1
118+
with:
119+
files: dist/*
120+
generate_release_notes: true
121+
draft: false
122+
prerelease: false

0 commit comments

Comments
 (0)