Skip to content

ci: update codecov/codecov-action action to v5 (#518) #2712

ci: update codecov/codecov-action action to v5 (#518)

ci: update codecov/codecov-action action to v5 (#518) #2712

Workflow file for this run

name: test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
transmission: ["version-3.00-r8", "4.0.5"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
services:
transmission:
image: linuxserver/transmission:${{ matrix.transmission }}
ports:
- 8080:9091
- 6881:6881
env:
UID: "1000"
TZ: Etc/UTC
USER: admin
PASS: my-secret-password
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
- run: pip install -e '.[dev]'
- name: test
run: coverage run -m pytest
env:
TR_PORT: 8080
TR_USER: admin
TR_PASSWORD: my-secret-password
- uses: codecov/codecov-action@v5
with:
flags: "${{ matrix.python }}"
token: ${{ secrets.CODECOV_TOKEN }}
test-unix-socket:
# At the time of writing ubuntu-latest is ubuntu-22.04. But we need
# an even later version because ubuntu-22.04 provides Transmission 3.0.0 but
# Unix socket support was added in Transmission 4.0.0. Use 24.04 which is
# currently in beta.
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y transmission-daemon
- run: mkdir -p $HOME/Downloads
- run: transmission-daemon --rpc-bind-address unix:/tmp/transmission.socket
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- run: pip install -e .[dev]
- run: coverage run -m pytest
env:
TR_PROTOCOL: 'http+unix'
TR_HOST: '/tmp/transmission.socket'
- uses: codecov/codecov-action@v5
with:
flags: "unix-socket"
token: ${{ secrets.CODECOV_TOKEN }}
dist-files:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pipx run flit build
- name: Check Files
run: pipx run twine check --strict dist/*