Skip to content

Trio backend: Better way to connect a socket #885

Trio backend: Better way to connect a socket

Trio backend: Better way to connect a socket #885

Workflow file for this run

name: Test
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
branches:
- main
paths:
- 'src/**'
- 'tests/**'
- '!**.pyi'
- 'tox.ini'
- 'pyproject.toml'
- 'pdm.lock'
- '.github/codecov.yml'
- '.github/actions/setup-tox/**'
- '.github/workflows/test.yml'
push:
branches:
- main
tags-ignore:
- '*'
paths:
- 'src/**'
- 'tests/**'
- '!**.pyi'
- 'tox.ini'
- 'pyproject.toml'
- 'pdm.lock'
- '.github/codecov.yml'
- '.github/actions/setup-tox/**'
- '.github/workflows/test.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
tests:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || (github.event.pull_request.draft != true && !contains(github.event.pull_request.labels.*.name, 'pr-skip-test')))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
python_version: ['3.11', '3.12']
include:
- python_version: '3.11'
tox_py: py311
- python_version: '3.12'
tox_py: py312
name: Tests (${{ matrix.os }}, ${{ matrix.python_version }})
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup tox (python ${{ matrix.python_version }})
uses: ./.github/actions/setup-tox
with:
python-version: ${{ matrix.python_version }}
- name: Launch tests
timeout-minutes: 20
run: tox run -f ${{ matrix.tox_py }} -- -v
- name: Generate coverage report
if: hashFiles('.coverage.*') != '' # Rudimentary `file.exists()`
continue-on-error: true
run: tox run -f coverage
# Currently, it is not possible to send several files with per-file tags.
# This is why the step is copy-paste twice.
# Issue: https://github.com/codecov/codecov-action/issues/1522
- name: Upload (unit tests) coverage to codecov
if: hashFiles('coverage.unit.xml') != '' # Rudimentary `file.exists()`
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: >-
coverage.unit.xml
flags: >-
test-unit,
OS-${{ runner.os }},
Py-${{ matrix.python_version }}
- name: Upload (functional tests) coverage to codecov
if: hashFiles('coverage.functional.xml') != '' # Rudimentary `file.exists()`
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: >-
coverage.functional.xml
flags: >-
test-functional,
OS-${{ runner.os }},
Py-${{ matrix.python_version }}