- Bumped version to 1.5.0 and updated project description for clarity. - Added build-system configuration for setuptools and wheel. - Specified authors and license information. - Updated Python version requirement to >=3.10. - Included project URLs for homepage and bug tracker. - Configured tools for code formatting (black) and linting (ruff). - Set pytest options for testing.
41 lines
No EOL
1 KiB
YAML
41 lines
No EOL
1 KiB
YAML
name: Python Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install --system dotenv>=0.9.9 httpx>=0.28.1 "mcp[cli]>=1.4.1" nest-asyncio>=1.6.0 python-dotenv>=1.1.0 telethon>=1.39.0 pytest pytest-asyncio
|
|
|
|
- name: Create mock env file
|
|
run: |
|
|
echo "TELEGRAM_API_ID=123456" > .env
|
|
echo "TELEGRAM_API_HASH=0123456789abcdef0123456789abcdef" >> .env
|
|
echo "TELEGRAM_SESSION_NAME=test_session" >> .env
|
|
echo "TELEGRAM_SESSION_STRING=" >> .env
|
|
|
|
- name: Run tests with pytest
|
|
run: |
|
|
pytest -xvs tests/ |