Skip to content
Merged
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
72 changes: 72 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
pull_request:

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

steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

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

- name: Run tests with pytest
run: |
uv run pytest tests/ -v --cov=src/pyeventcloud --cov-report=term-missing

- name: Run type checking with mypy
run: |
uv run mypy src/

build:
name: Build distribution
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

- name: Build package
run: uv build

- name: Check build artifacts
run: |
ls -lh dist/
echo "Build successful!"

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-${{ github.sha }}
path: dist/
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,44 @@ body, headers = binding.to_structured(event, ProtobufFormatter()) # Future

## Development

### Running Tests
### Setup

```bash
# Install development dependencies
pip install -e ".[dev]"
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone https://github.com/plugarut/pyeventcloud.git
cd pyeventcloud

# Install dependencies
uv sync --dev
```

### Running Tests

```bash
# Run all tests
pytest
uv run pytest

# Run with coverage
pytest --cov=src/pyeventcloud --cov-report=term-missing
uv run pytest --cov=src/pyeventcloud --cov-report=term-missing

# Run type checking
mypy --strict src/pyeventcloud
uv run mypy src/

# Run specific test file
uv run pytest tests/unit/test_event.py -v
```

### Building

```bash
# Build distribution packages
uv build

# Check build artifacts
ls -lh dist/
```

## Contributing
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Homepage = "https://github.com/plugarut/pyeventcloud"
Documentation = "https://github.com/plugarut/pyeventcloud#readme"
Repository = "https://github.com/plugarut/pyeventcloud"
Issues = "https://github.com/plugarut/pyeventcloud/issues"
Changelog = "https://github.com/plugarut/pyeventcloud/blob/main/CHANGELOG.md"

[build-system]
requires = ["uv_build>=0.9.0,<0.10.0"]
Expand Down
58 changes: 56 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.