2020-08-12 12:56:28 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
name: Python Tests
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-11-29 21:58:56 +00:00
|
|
|
python-version: [3.7, 3.8, 3.9]
|
2020-08-12 12:56:28 +00:00
|
|
|
platform: [ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- name: Install Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r python/requirements.txt
|
|
|
|
if [ -f python/requirements.dev.txt ]; then pip install -r python/requirements.dev.txt; fi
|
|
|
|
- name: Build and install package
|
|
|
|
run: |
|
|
|
|
pip install -e python
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
pytest python/
|