Skip to content

feat: Refactor Playlists and Radio views with new tile components #62

feat: Refactor Playlists and Radio views with new tile components

feat: Refactor Playlists and Radio views with new tile components #62

Workflow file for this run

name: Python Tests
on:
workflow_dispatch:
push:
branches: [main, development]
paths:
- connect/**
pull_request:
paths:
- connect/**
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
# Before the tests, not after: a lint failure is decided in
# seconds, while the suite (plus the ffmpeg install above it)
# takes minutes. Nothing here needs ffmpeg, but the ordering
# inside a single job is what it is — a lint-only job of its own
# would just pay the checkout and uv setup twice.
- name: Lint
working-directory: connect
run: uv run --group dev ruff check .
- name: Check formatting
working-directory: connect
run: uv run --group dev ruff format --check .
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run tests
working-directory: connect
run: uv run --group dev pytest --cov --cov-report=xml --cov-report=term-missing
# Codecov only accepts tokenless uploads from forks opening a
# pull request; a push to our own branches needs the repository
# upload token, or it answers "Token required - not valid
# tokenless upload" and the badge stays at "unknown". That was
# invisible for a long time because fail_ci_if_error below keeps
# the job green either way — deliberately, since Codecov being
# down is not a reason to fail a test run, but it does mean the
# badge is the only thing that ever reports this.
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: connect/coverage.xml
flags: backend
fail_ci_if_error: false