pyo3/.github/workflows/test.yml
2020-03-25 11:30:33 -04:00

42 lines
1.4 KiB
YAML

name: Test
on: [push, pull_request]
jobs:
build:
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
runs-on: ${{ matrix.platform.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
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" },
]
steps:
- uses: actions/checkout@v2
- 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
- run: rustup set default-host ${{ matrix.platform.rust-target }}
- 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
run: ci/actions/test.sh
shell: bash
env:
RUST_BACKTRACE: 1