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
34 changes: 34 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python Tests

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install

- name: Run unit tests
run: poetry run pytest
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The Campus API Python library is a comprehensive client for interacting with the

## Tech Stack

- **Language:** Python 3.11
- **Language:** Python 3.11 and 3.12
- **Package Management:** Poetry
- **Dependencies:**
- `flask` - Web framework (for integration)
Expand All @@ -28,10 +28,12 @@ The Campus API Python library is a comprehensive client for interacting with the

### Prerequisites

- Python 3.11
- Python 3.11 or 3.12
- Poetry
- Access to Campus development environment (for server mode)

This library is intended to support both Python 3.11 and Python 3.12.

### Installation

1. **Clone the repository** (if not already done):
Expand Down Expand Up @@ -135,6 +137,8 @@ Run the test suite:
poetry run pytest
```

GitHub Actions runs the unit tests against both Python 3.11 and Python 3.12.

Unit tests are located in `tests/unit/`.

### Code Quality
Expand Down
77 changes: 71 additions & 6 deletions poetry.lock

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

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ python = ">=3.11,<3.14"
flask = "^3.0.0"
campus-suite = {git = "https://github.com/nyjc-computing/campus.git", branch = "weekly"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.4.2"

[[tool.poetry.packages]]
include = "campus_python"

Expand Down
Loading
Loading