Skip to content

Test & lint package & deploy documentation #225

Test & lint package & deploy documentation

Test & lint package & deploy documentation #225

Workflow file for this run

name: Test & lint package & deploy documentation
on:
workflow_dispatch:
schedule:
# run every Monday at 15:00 UTC
- cron: "0 15 * * 1"
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
python: "3.13"
name: Python ${{ matrix.python }}
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v5
- name: Install the latest version of uv and setup Python
uses: astral-sh/setup-uv@v6
with:
version: "latest"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
uv sync --all-extras
- name: Lint with ruff
run: |
uv run ruff check --fix --exit-non-zero-on-fix pytximport
- name: Format with ruff
run: |
uv run ruff format --check pytximport
- name: Type check with mypy
run: |
uv run mypy -p pytximport
- name: Check security with bandit
run: |
uv run bandit --verbose --ini .bandit.ini -ll --recursive pytximport
- name: Test with pytest
run: |
uv run coverage run -m pytest --maxfail=10 -m "not gpu" -m "not no_github_ci"
uv run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}