Skip to content

add quickstart to code interpreter #6

add quickstart to code interpreter

add quickstart to code interpreter #6

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
lint:
name: Lint
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
uses: astral-sh/setup-uv@v3
- name: Create virtual environment
run: uv venv
- name: Install dependencies
run: |
source .venv/bin/activate
uv sync --all-extras
- name: Run pre-commit hooks
run: |
source .venv/bin/activate
pre-commit run --all-files || true
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
fail-fast: false
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
uses: astral-sh/setup-uv@v3
- name: Create virtual environment
run: uv venv --python ${{ matrix.python-version }}
- name: Install dependencies
run: |
source .venv/bin/activate
uv sync --all-extras
- name: Run tests with coverage
run: |
source .venv/bin/activate
pytest tests/ \
--cov=src \
--cov-report=term-missing \
--cov-report=xml \
--cov-report=html \
--cov-fail-under=80 \
--cov-branch \
-v || true
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.10'
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.python-version }}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage HTML report
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.10'
with:
name: coverage-report
path: htmlcov/
build:
name: Build Package
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
uses: astral-sh/setup-uv@v3
- name: Create virtual environment
run: uv venv
- name: Install build dependencies
run: |
source .venv/bin/activate
uv pip install build twine
- name: Build package
run: |
source .venv/bin/activate
python -m build
- name: Check package
run: |
source .venv/bin/activate
twine check dist/* || true
- name: List package contents
run: |
source .venv/bin/activate
python -m zipfile -l dist/*.whl
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-packages
path: dist/
validate-install:
name: Validate 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 build artifacts
uses: actions/download-artifact@v4
with:
name: dist-packages
path: dist/
- name: Install from wheel
run: |
python -m venv test-env
source test-env/bin/activate
pip install dist/*.whl
- name: Test imports
run: |
source test-env/bin/activate
python -c "from bedrock_agentcore_starter_toolkit import Runtime" || true
python -c "from bedrock_agentcore_starter_toolkit.cli.cli import main" || true
- name: Test CLI
run: |
source test-env/bin/activate
agentcore --help || true