Experimental Priority Scheduling #341
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- "release/**" | |
- "dev/**" | |
tags: [v*] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.8", "3.12"] | |
include: | |
- os: windows-latest | |
python-version: '3.8' | |
name: Run linting on Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install dependencies | |
run: poetry install | |
- name: Coverage | |
run: poetry run poe cov | |
- name: Run Lint | |
run: poetry run poe lint | |
- name: Run Black | |
run: poetry run poe black --check | |
- name: Run typechecks | |
run: poetry run poe typing | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10", ] | |
include: | |
- os: windows-latest | |
python-version: '3.8' | |
name: Run unittests on Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# cache: 'poetry' # cache is causing problems | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install dev dependencies | |
run: poetry install | |
- name: Run the tests for selector loop | |
run: poetry run pytest | |
- name: Run the tests for proactor loop | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: poetry run pytest --proactor | |
testall: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Tests (matrix) | |
needs: tests | |
steps: | |
- name: Check test matrix status | |
if: ${{ needs.tests.result != 'success' }} | |
run: exit 1 | |
build-n-publish: | |
name: Build and publish Python distributions to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') | |
needs: | |
- tests | |
- lint | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Build a binary wheel and a source tarball | |
run: poetry build | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
- name: Publish distribution to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |