From 6ea52b46660a075591812e1fff48ad4da0b4beb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8D=95=ED=99=98?= Date: Wed, 4 Feb 2026 02:14:20 +0900 Subject: [PATCH 1/2] [FEAT] Add GitHub configuration: CI/CD, templates, and dependabot (#1) (#3) ## Description Add complete .github/ directory with CI/CD workflows, issue/PR templates, and dependabot configuration for the AgentGram Python SDK repository. ## Type of Change - [x] New feature (non-breaking change which adds functionality) ## Changes Made - **CI workflow** (`ci.yml`): Runs tests, ruff lint, mypy type-check, and black format check across Python 3.9-3.12 - **Auto-release workflow** (`auto-release.yml`): Creates GitHub release and publishes to PyPI on main merge when version changes - **Auto-label workflow** (`auto-label.yml`): Labels PRs by file path (sdk, testing, examples, infrastructure) and size - **Labeler config** (`labeler.yml`): Path-based label mappings for actions/labeler - **Dependabot config** (`dependabot.yml`): Weekly updates for pip and github-actions dependencies - **Bug report template** (`ISSUE_TEMPLATE/bug_report.yml`): Structured bug reports with version, Python version, and OS fields - **Feature request template** (`ISSUE_TEMPLATE/feature_request.yml`): Structured feature proposals - **Issue template config** (`ISSUE_TEMPLATE/config.yml`): Disables blank issues, links to docs and platform repo - **PR template** (`PULL_REQUEST_TEMPLATE.md`): Standard PR checklist with testing requirements - **Release config** (`release.yml`): Categorized changelog generation for GitHub releases ## Related Issues Closes #1 ## Testing - [x] All files are YAML/Markdown configuration - no runtime code to test - [x] Workflow syntax validated ## Checklist - [x] My code follows the project's code style - [x] I have performed a self-review of my code - [x] My changes generate no new warnings Co-authored-by: Sisyphus --- .github/ISSUE_TEMPLATE/bug_report.yml | 74 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ .github/ISSUE_TEMPLATE/feature_request.yml | 33 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 33 ++++++++++ .github/dependabot.yml | 19 ++++++ .github/labeler.yml | 18 ++++++ .github/release.yml | 23 +++++++ .github/workflows/auto-label.yml | 26 ++++++++ .github/workflows/auto-release.yml | 69 ++++++++++++++++++++ .github/workflows/ci.yml | 41 ++++++++++++ 10 files changed, 344 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/labeler.yml create mode 100644 .github/release.yml create mode 100644 .github/workflows/auto-label.yml create mode 100644 .github/workflows/auto-release.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..59afc61 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,74 @@ +name: Bug Report +description: Report a bug in the AgentGram Python SDK +title: "[Bug]: " +labels: ["type: bug", "status: needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting a bug! Please fill out the sections below. + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear description of the bug + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Minimal code to reproduce the issue + render: python + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What should happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What happens instead? + validations: + required: true + + - type: input + id: version + attributes: + label: SDK Version + description: Output of `pip show agentgram` + placeholder: "0.1.0" + validations: + required: true + + - type: dropdown + id: python-version + attributes: + label: Python Version + options: + - "3.9" + - "3.10" + - "3.11" + - "3.12" + validations: + required: true + + - type: dropdown + id: os + attributes: + label: Operating System + options: + - macOS + - Linux + - Windows + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..7fa8fd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Documentation + url: https://docs.agentgram.co + about: Check the documentation before opening an issue + - name: AgentGram Platform Issues + url: https://github.com/agentgram/agentgram/issues + about: For issues with the AgentGram platform itself diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..fcc1e8b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature Request +description: Suggest a feature for the AgentGram Python SDK +title: "[Feature]: " +labels: ["type: feature", "status: needs triage"] +body: + - type: textarea + id: problem + attributes: + label: Problem Statement + description: What problem does this solve? + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: How should this work? Include code examples if possible. + render: python + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Other approaches you've considered + + - type: textarea + id: context + attributes: + label: Additional Context + description: Any other relevant information diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ee0a265 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,33 @@ +## Description + + + +## Type of Change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update +- [ ] Refactoring (no behavior change) + +## Changes Made + +- + +## Related Issues + +Closes # + +## Testing + +- [ ] Tests pass locally (`pytest tests/ -v`) +- [ ] Lint passes (`ruff check agentgram/ tests/`) +- [ ] Type check passes (`mypy agentgram/`) +- [ ] Format check passes (`black --check agentgram/ tests/`) + +## Checklist + +- [ ] My code follows the project's code style +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] I have made corresponding changes to the documentation diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..52e91db --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + day: monday + labels: + - dependencies + open-pull-requests-limit: 10 + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + labels: + - dependencies + - area: infrastructure diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..ef15918 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,18 @@ +"area: sdk": + - changed-files: + - any-glob-to-any-file: "agentgram/**" + +"area: testing": + - changed-files: + - any-glob-to-any-file: "tests/**" + +"area: examples": + - changed-files: + - any-glob-to-any-file: "examples/**" + +"area: infrastructure": + - changed-files: + - any-glob-to-any-file: + - ".github/**" + - "pyproject.toml" + - ".gitignore" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..47c8280 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,23 @@ +changelog: + exclude: + labels: + - dependencies + authors: + - dependabot + categories: + - title: Breaking Changes + labels: + - breaking change + - title: New Features + labels: + - "type: feature" + - "type: enhancement" + - title: Bug Fixes + labels: + - "type: bug" + - title: Documentation + labels: + - "type: documentation" + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..ba5fed3 --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,26 @@ +name: Auto Label + +on: + pull_request: + types: [opened, synchronize] + +permissions: + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + size-label: + runs-on: ubuntu-latest + steps: + - uses: pascalgn/size-label-action@v0.5.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + sizes: > + {"0": "XS", "10": "S", "30": "M", "100": "L", "500": "XL", "1000": "XXL"} diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..2cba9b2 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,69 @@ +name: Auto Release + +on: + push: + branches: [main] + +permissions: + contents: write + +jobs: + release: + name: Create Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get version from pyproject.toml + id: version + run: | + VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Check if tag exists + id: check_tag + run: | + if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "exists=false" >> $GITHUB_OUTPUT + fi + + - name: Create tag and release + if: steps.check_tag.outputs.exists == 'false' + env: + GH_TOKEN: ${{ github.token }} + run: | + git tag "v${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + gh release create "v${{ steps.version.outputs.version }}" \ + --title "v${{ steps.version.outputs.version }}" \ + --generate-notes + + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + needs: release + environment: pypi + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c84802e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [develop, main] + pull_request: + branches: [develop, main] + +jobs: + test: + name: Test (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + 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 dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" + + - name: Lint with ruff + run: ruff check agentgram/ tests/ + + - name: Type check with mypy + run: mypy agentgram/ + + - name: Format check with black + run: black --check agentgram/ tests/ + + - name: Run tests + run: pytest tests/ -v --tb=short From 32bcd0cc52c3419ed990f6e613b7bc3fdb6ef387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8D=95=ED=99=98?= Date: Wed, 4 Feb 2026 02:18:35 +0900 Subject: [PATCH 2/2] [FEAT] Add CI/CD workflows, issue templates, and GitHub config (#2) (#4) ## Description Add complete `.github/` directory with CI/CD workflows, issue/PR templates, dependabot config, auto-label workflow, and release changelog configuration. Separates release and publish workflows, standardizes templates, and adds documentation label support. ## Type of Change - [x] New feature (non-breaking change which adds functionality) ## Changes Made - **CI workflow** (`ci.yml`): Lint (ruff), format check (black), type check (mypy), and tests (pytest) across Python 3.9-3.12 - **Auto-release workflow** (`auto-release.yml`): Creates GitHub release via `softprops/action-gh-release` when version changes on main - **PyPI publish workflow** (`publish.yml`): Separate workflow triggered on release, publishes via trusted publisher - **Auto-label workflow** (`auto-label.yml`): Labels PRs based on changed file paths - **Labeler config** (`labeler.yml`): Maps paths to labels (sdk, testing, examples, infrastructure, documentation) - **Dependabot** (`dependabot.yml`): Weekly updates for pip and GitHub Actions - **Bug report template**: Structured form with SDK version, Python version, description, steps to reproduce - **Feature request template**: Problem statement, proposed solution, alternatives - **Issue config**: Disables blank issues, links to docs and main repo - **PR template**: Description, type of change, testing checklist - **Release config** (`release.yml`): Categorized changelog with Dependencies section ## Related Issues Closes #2 ## Checklist - [x] My code follows the project's code style - [x] No existing functionality is affected (config/template files only) Co-authored-by: Sisyphus --- .github/ISSUE_TEMPLATE/bug_report.yml | 59 +++++++--------------- .github/ISSUE_TEMPLATE/config.yml | 8 +-- .github/ISSUE_TEMPLATE/feature_request.yml | 13 ++--- .github/PULL_REQUEST_TEMPLATE.md | 15 +++--- .github/dependabot.yml | 5 +- .github/labeler.yml | 7 ++- .github/release.yml | 16 +++--- .github/workflows/auto-label.yml | 11 +--- .github/workflows/auto-release.yml | 53 ++++--------------- .github/workflows/ci.yml | 17 ++----- .github/workflows/publish.yml | 25 +++++++++ 11 files changed, 89 insertions(+), 140 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 59afc61..300231e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,13 +1,27 @@ name: Bug Report description: Report a bug in the AgentGram Python SDK -title: "[Bug]: " labels: ["type: bug", "status: needs triage"] body: - type: markdown attributes: value: | - Thanks for reporting a bug! Please fill out the sections below. - + Thanks for reporting a bug! Please fill out the form below. + - type: input + id: version + attributes: + label: SDK Version + description: What version of agentgram are you using? + placeholder: "0.1.0" + validations: + required: true + - type: input + id: python-version + attributes: + label: Python Version + description: What Python version are you using? + placeholder: "3.12" + validations: + required: true - type: textarea id: description attributes: @@ -15,7 +29,6 @@ body: description: A clear description of the bug validations: required: true - - type: textarea id: reproduction attributes: @@ -24,51 +37,17 @@ body: render: python validations: required: true - - type: textarea id: expected attributes: label: Expected Behavior - description: What should happen? + description: What did you expect to happen? validations: required: true - - type: textarea id: actual attributes: label: Actual Behavior - description: What happens instead? - validations: - required: true - - - type: input - id: version - attributes: - label: SDK Version - description: Output of `pip show agentgram` - placeholder: "0.1.0" - validations: - required: true - - - type: dropdown - id: python-version - attributes: - label: Python Version - options: - - "3.9" - - "3.10" - - "3.11" - - "3.12" - validations: - required: true - - - type: dropdown - id: os - attributes: - label: Operating System - options: - - macOS - - Linux - - Windows + description: What actually happened? validations: required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7fa8fd0..d1b3971 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: false contact_links: - - name: Documentation - url: https://docs.agentgram.co - about: Check the documentation before opening an issue + - name: AgentGram Documentation + url: https://agentgram.co/docs + about: Check the documentation first - name: AgentGram Platform Issues url: https://github.com/agentgram/agentgram/issues - about: For issues with the AgentGram platform itself + about: For platform issues, use the main repo diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index fcc1e8b..658a41a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,5 @@ name: Feature Request -description: Suggest a feature for the AgentGram Python SDK -title: "[Feature]: " +description: Suggest a new feature for the Python SDK labels: ["type: feature", "status: needs triage"] body: - type: textarea @@ -10,24 +9,20 @@ body: description: What problem does this solve? validations: required: true - - type: textarea id: solution attributes: label: Proposed Solution - description: How should this work? Include code examples if possible. - render: python + description: How should this work? validations: required: true - - type: textarea id: alternatives attributes: label: Alternatives Considered - description: Other approaches you've considered - + description: Any alternative approaches you considered? - type: textarea id: context attributes: label: Additional Context - description: Any other relevant information + description: Any other context or code examples diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ee0a265..30c5d98 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ ## Description - +Brief description of the changes. ## Type of Change @@ -8,7 +8,6 @@ - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update -- [ ] Refactoring (no behavior change) ## Changes Made @@ -20,14 +19,14 @@ Closes # ## Testing -- [ ] Tests pass locally (`pytest tests/ -v`) -- [ ] Lint passes (`ruff check agentgram/ tests/`) +- [ ] Tests pass (`pytest tests/ -v`) +- [ ] Lint passes (`ruff check .`) +- [ ] Format passes (`black --check .`) - [ ] Type check passes (`mypy agentgram/`) -- [ ] Format check passes (`black --check agentgram/ tests/`) ## Checklist - [ ] My code follows the project's code style -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes -- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix/feature works +- [ ] New and existing tests pass locally +- [ ] I have updated the documentation accordingly diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 52e91db..80c9b94 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,16 +4,13 @@ updates: directory: / schedule: interval: weekly - day: monday labels: - dependencies - open-pull-requests-limit: 10 + open-pull-requests-limit: 5 - package-ecosystem: github-actions directory: / schedule: interval: weekly - day: monday labels: - dependencies - - area: infrastructure diff --git a/.github/labeler.yml b/.github/labeler.yml index ef15918..0dc806c 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -15,4 +15,9 @@ - any-glob-to-any-file: - ".github/**" - "pyproject.toml" - - ".gitignore" + +"type: documentation": + - changed-files: + - any-glob-to-any-file: + - "*.md" + - "docs/**" diff --git a/.github/release.yml b/.github/release.yml index 47c8280..81cf76a 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,23 +1,21 @@ changelog: - exclude: - labels: - - dependencies - authors: - - dependabot categories: - title: Breaking Changes labels: - breaking change - title: New Features labels: - - "type: feature" - - "type: enhancement" + - type: feature + - type: enhancement - title: Bug Fixes labels: - - "type: bug" + - type: bug - title: Documentation labels: - - "type: documentation" + - type: documentation + - title: Dependencies + labels: + - dependencies - title: Other Changes labels: - "*" diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index ba5fed3..574082a 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -6,6 +6,7 @@ on: permissions: pull-requests: write + contents: read jobs: label: @@ -15,12 +16,4 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - size-label: - runs-on: ubuntu-latest - steps: - - uses: pascalgn/size-label-action@v0.5.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - sizes: > - {"0": "XS", "10": "S", "30": "M", "100": "L", "500": "XL", "1000": "XXL"} +# .github/labeler.yml handles the path-to-label mapping diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 2cba9b2..01fc483 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -9,61 +9,28 @@ permissions: jobs: release: - name: Create Release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Get version from pyproject.toml + - name: Get version id: version run: | - VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") - echo "version=$VERSION" >> $GITHUB_OUTPUT - + VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])") + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Check if tag exists id: check_tag run: | if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then - echo "exists=true" >> $GITHUB_OUTPUT + echo "exists=true" >> "$GITHUB_OUTPUT" else - echo "exists=false" >> $GITHUB_OUTPUT + echo "exists=false" >> "$GITHUB_OUTPUT" fi - - - name: Create tag and release + - name: Create Release if: steps.check_tag.outputs.exists == 'false' - env: - GH_TOKEN: ${{ github.token }} - run: | - git tag "v${{ steps.version.outputs.version }}" - git push origin "v${{ steps.version.outputs.version }}" - gh release create "v${{ steps.version.outputs.version }}" \ - --title "v${{ steps.version.outputs.version }}" \ - --generate-notes - - publish: - name: Publish to PyPI - runs-on: ubuntu-latest - needs: release - environment: pypi - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 + uses: softprops/action-gh-release@v2 with: - python-version: "3.12" - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip - pip install build - - - name: Build package - run: python -m build - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + tag_name: v${{ steps.version.outputs.version }} + name: v${{ steps.version.outputs.version }} + generate_release_notes: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c84802e..0cff71f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,34 +8,25 @@ on: jobs: test: - name: Test (Python ${{ matrix.python-version }}) runs-on: ubuntu-latest strategy: - fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] - 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 dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev]" - - name: Lint with ruff - run: ruff check agentgram/ tests/ - + run: ruff check . + - name: Format check with black + run: black --check . - name: Type check with mypy run: mypy agentgram/ - - - name: Format check with black - run: black --check agentgram/ tests/ - - name: Run tests - run: pytest tests/ -v --tb=short + run: pytest tests/ -v diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6687403 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +permissions: + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + environment: pypi + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install build tools + run: pip install build + - name: Build package + run: python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1