Skip to content
Open
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
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci"
include: "scope"

# Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "deps"
include: "scope"
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read
pull-requests: read

jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --frozen --dev

- name: Lint and format check with Ruff
run: |
uv run ruff check .
uv run ruff format --check .

- name: Type check with mypy
run: uv run mypy openproject_mcp.py
continue-on-error: true # Report issues but don't fail build

test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --frozen --dev

- name: Create junit directory
run: mkdir -p junit

- name: Run tests
run: uv run pytest tests/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: junit/test-results-*.xml

build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Build package
run: uv build

- name: Verify build outputs
run: |
test -f dist/*.whl
test -f dist/*.tar.gz

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
80 changes: 80 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish to PyPI

on:
push:
tags:
- 'v*' # Trigger on any tag starting with 'v' (e.g., v1.0.0, v1.2.3)

permissions:
contents: write # Required to create GitHub releases
id-token: write # Required for PyPI trusted publishing

jobs:
build:
name: Build Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Build package
run: uv build

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

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/project/openproject-mcp

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

- name: Set up uv
uses: astral-sh/setup-uv@v7

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
--generate-notes \
--latest
81 changes: 81 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Security

on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC

permissions:
contents: read
pull-requests: write # For dependency review comments

jobs:
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
fail-on-severity: high

sbom:
name: Generate SBOM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --frozen --all-extras

- name: Generate SBOM
run: uv run cyclonedx-py environment -o sbom.json --of json

- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom
path: sbom.json
retention-days: 90

codeql:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ipython_config.py
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock
# uv.lock is now tracked for reproducible CI builds

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
Expand Down Expand Up @@ -207,4 +207,7 @@ marimo/_lsp/
__marimo__/

# Claude Code configuration
CLAUDE.md
CLAUDE.md

# GitHub Actions planning document (local use only)
GITHUB_ACTIONS_PLAN.md
Loading