Skip to content

Updated rtd config #133

Updated rtd config

Updated rtd config #133

Workflow file for this run

name: Continuous Integration
on: [push, pull_request]
defaults:
run:
shell: bash
concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install system dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libpulse0
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Print Python Information
run: python -VV
- name: Install and configure uv
run: |
pip3 install uv
- name: Set up cache
uses: actions/cache@v4
id: cached-uv-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: uv sync --all-extras
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
- name: Download TeamTalk SDK
run: uv run python -c "import teamtalk"
- name: run linting
run: uv run pre-commit run --all-files
builder_teamtalk:
needs: [test]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-20.04 # Any OS is fine as this wheel is not OS dependent
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: 3.9 # Build any 1 python version as this wheel is not version dependent
- name: Install and configure uv
run: |
pip3 install uv
- name: Set up cache
uses: actions/cache@v4
id: cached-uv-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: uv sync --all-extras
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
- name: Build
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publisher_release:
needs: [builder_teamtalk]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true