2019-11-16 12:39:59 +00:00
|
|
|
name: Test
|
|
|
|
|
2019-12-28 11:36:20 +00:00
|
|
|
on: [push, pull_request]
|
2019-11-16 12:39:59 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-03-24 05:59:03 +00:00
|
|
|
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
2019-11-16 12:39:59 +00:00
|
|
|
strategy:
|
2020-03-24 05:59:03 +00:00
|
|
|
max-parallel: 12
|
2019-11-16 12:39:59 +00:00
|
|
|
matrix:
|
2020-02-01 13:40:54 +00:00
|
|
|
python-version: [3.5, 3.6, 3.7, 3.8]
|
2020-03-24 05:59:03 +00:00
|
|
|
platform: [
|
|
|
|
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
|
|
|
|
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
|
|
|
|
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
|
|
|
|
]
|
2019-11-16 12:39:59 +00:00
|
|
|
|
|
|
|
steps:
|
2020-03-25 02:28:33 +00:00
|
|
|
- uses: actions/checkout@v2
|
2019-12-28 11:36:20 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
default: true
|
2020-03-24 05:59:03 +00:00
|
|
|
- run: rustup set default-host ${{ matrix.platform.rust-target }}
|
2019-12-28 11:36:20 +00:00
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
|
|
|
- name: Install test dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install -U pip setuptools
|
|
|
|
pip install setuptools-rust pytest pytest-benchmark tox tox-venv
|
|
|
|
- name: Test
|
2020-03-24 05:59:03 +00:00
|
|
|
run: ci/actions/test.sh
|
|
|
|
shell: bash
|
2020-01-12 14:33:34 +00:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|