Skip to content

An AI Agent that interacts with Windows OS at GUI level.

Python

ci: add GitHub Actions workflows for CI and PyPI publishing

jeomon80b5a5977bc0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..d746f6d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,45 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+
+ - name: Run ruff lint
+ run: uvx ruff check .
+
+ - name: Run ruff format check
+ run: uvx ruff format --check .
+
+ test:
+ name: Test (Python ${{ matrix.python-version }})
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install dependencies
+ run: uv sync --extra dev
+
+ - name: Run unit tests
+ run: uv run pytest tests/unit/ -v --tb=short
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..d9f94f3
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,26 @@
+name: Publish to PyPI
+
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ publish:
+ name: Build & Publish
+ runs-on: ubuntu-latest
+ environment: pypi
+ permissions:
+ id-token: write
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+
+ - name: Build package
+ run: uv build
+
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1