2020-09-02 14:12:08 +00:00
|
|
|
name: CI
|
|
|
|
|
2022-04-11 21:37:06 +00:00
|
|
|
on:
|
|
|
|
# any time someone pushes a new branch to origin
|
|
|
|
push:
|
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
2020-09-02 14:12:08 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
mypy:
|
|
|
|
name: 'MyPy'
|
|
|
|
runs-on: ubuntu-latest
|
2021-07-08 17:53:28 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-07-08 17:53:28 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
2022-04-12 16:53:12 +00:00
|
|
|
python-version: '3.10'
|
2021-07-08 17:53:28 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Install dependencies
|
2021-07-08 17:53:28 +00:00
|
|
|
run: pip install -U . --upgrade-strategy eager -r requirements-test.txt
|
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Run MyPy check
|
|
|
|
run: mypy tractor/ --ignore-missing-imports
|
|
|
|
|
2022-07-11 18:13:21 +00:00
|
|
|
sdist-linux:
|
|
|
|
name: 'sdist'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
|
|
|
|
|
|
|
- name: Build sdist
|
|
|
|
run: python setup.py sdist --formats=zip
|
|
|
|
|
|
|
|
- name: Install sdist from .zips
|
|
|
|
run: python -m pip install dist/*.zip
|
|
|
|
|
|
|
|
|
2021-11-02 16:19:58 +00:00
|
|
|
testing-linux:
|
2020-09-02 14:31:10 +00:00
|
|
|
name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }}'
|
2021-12-10 20:50:34 +00:00
|
|
|
timeout-minutes: 10
|
2020-09-02 14:12:08 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-11-02 16:19:58 +00:00
|
|
|
os: [ubuntu-latest]
|
2021-11-01 18:12:42 +00:00
|
|
|
python: ['3.9', '3.10']
|
2020-09-02 14:12:08 +00:00
|
|
|
spawn_backend: ['trio', 'mp']
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
steps:
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '${{ matrix.python }}'
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2020-09-02 14:12:08 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pip install -U . -r requirements-test.txt -r requirements-docs.txt --upgrade-strategy eager
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2022-08-02 22:19:03 +00:00
|
|
|
- name: List dependencies
|
|
|
|
run: pip freeze
|
|
|
|
|
2021-07-02 15:18:05 +00:00
|
|
|
- name: Run tests
|
2022-08-01 15:32:17 +00:00
|
|
|
run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rsx
|
2021-07-02 15:18:05 +00:00
|
|
|
|
2021-11-02 16:19:58 +00:00
|
|
|
# We skip 3.10 on windows for now due to
|
|
|
|
# https://github.com/pytest-dev/pytest/issues/8733
|
|
|
|
# some kinda weird `pyreadline` issue..
|
|
|
|
|
|
|
|
# TODO: use job filtering to accomplish instead of repeated
|
|
|
|
# boilerplate as is above XD:
|
|
|
|
# - https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows
|
|
|
|
# - https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
|
|
# - https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idif
|
|
|
|
testing-windows:
|
|
|
|
name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }}'
|
2021-12-20 14:25:38 +00:00
|
|
|
timeout-minutes: 12
|
2021-11-02 16:19:58 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest]
|
2022-07-12 00:15:35 +00:00
|
|
|
python: ['3.9', '3.10']
|
2021-11-02 16:19:58 +00:00
|
|
|
spawn_backend: ['trio', 'mp']
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '${{ matrix.python }}'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pip install -U . -r requirements-test.txt -r requirements-docs.txt --upgrade-strategy eager
|
|
|
|
|
2022-08-02 22:19:03 +00:00
|
|
|
- name: List dependencies
|
|
|
|
run: pip freeze
|
|
|
|
|
2021-11-02 16:19:58 +00:00
|
|
|
- name: Run tests
|
2022-06-26 20:00:14 +00:00
|
|
|
run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rs --full-trace
|