Skip to content

Formatted workflows files and added auto release creator workflow #14

Formatted workflows files and added auto release creator workflow

Formatted workflows files and added auto release creator workflow #14

Workflow file for this run

name: CI - Python Tests Across Multiple Environments
on:
push:
branches: ["main"]
paths:
- ".github/workflows/ci.yaml"
- "pyproject.toml"
- "poetry.lock"
- "tests/**"
- "streamsnapper/**"
pull_request:
paths:
- ".github/workflows/ci.yaml"
- "pyproject.toml"
- "poetry.lock"
- "tests/**"
- "streamsnapper/**"
jobs:
test:
name: 🐍 Python ${{ matrix.python-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # "windows-latest"
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- name: 📥 Checkout Repository
uses: actions/checkout@v4
- name: 🐍 Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: 📦 Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: 🪟 Configure Windows PATH
if: runner.os == 'Windows'
shell: pwsh
run: |
echo "⚙️ Adding Python Scripts to PATH..."
echo "$env:APPDATA\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: 💾 Cache Dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ matrix.python-version }}-
- name: 📚 Install Dependencies
shell: bash
run: |
echo "🔧 Installing project dependencies with all extras..."
poetry install --extras "all" --no-interaction
- name: 🧪 Run Tests
shell: bash
run: |
echo "🚀 Running test suite..."
poetry run pytest tests/all.py -v