tractor/.github/workflows/ci.yml

165 lines
4.4 KiB
YAML
Raw Permalink Normal View History

2020-09-02 14:12:08 +00:00
name: CI
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
2020-09-02 14:12:08 +00:00
steps:
- name: Checkout
uses: actions/checkout@v2
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'
2020-09-02 14:12:08 +00:00
- name: Install dependencies
run: pip install -U . --upgrade-strategy eager -r requirements-test.txt
2020-09-02 14:12:08 +00:00
- name: Run MyPy check
2022-10-09 22:13:45 +00:00
run: mypy tractor/ --ignore-missing-imports --show-traceback
2020-09-02 14:12:08 +00:00
# test that we can generate a software distribution and install it
# thus avoid missing file issues after packaging.
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
testing-linux:
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:
os: [ubuntu-latest]
2022-08-03 19:38:27 +00:00
python: ['3.10']
spawn_backend: [
'trio',
'mp_spawn',
'mp_forkserver',
]
2021-07-02 15:18:05 +00:00
2020-09-02 14:12:08 +00:00
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
- name: List dependencies
run: pip list
- name: Run tests
run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rsx
2021-07-02 15:18:05 +00:00
testing-macos:
name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }}'
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
python: ['3.10']
spawn_backend: [
'trio',
]
steps:
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 list
2022-08-02 22:19:03 +00:00
2021-07-02 15:18:05 +00:00
- name: Run tests
run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rsx
2021-07-02 15:18:05 +00:00
# We skip 3.10 on windows for now due to not having any collabs to
# debug the CI failures. Anyone wanting to hack and solve them is very
# welcome, but our primary user base is not using that OS.
# 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 }}'
# timeout-minutes: 12
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest]
# python: ['3.10']
# 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
# # TODO: pretty sure this solves debugger deps-issues on windows, but it needs to
# # be verified by someone with a native setup.
# # - name: Force pyreadline3
# # run: pip uninstall pyreadline; pip install -U pyreadline3
# - name: List dependencies
# run: pip list
2022-08-02 22:19:03 +00:00
# - name: Run tests
# run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rsx