Skip to content

Test

Test #46

Workflow file for this run

name: Test
on:
workflow_dispatch:
inputs:
upload_data:
default: false
type: boolean
cpp:
default: ''
type: string
# - push
# - pull_request
# - fork
defaults:
run:
shell: bash
jobs:
setup-and-test:
name: Python-${{ matrix.python }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Linux
- os: ubuntu-latest
python: 3.7
- os: ubuntu-latest
python: 3.8
- os: ubuntu-latest
python: 3.9
- os: ubuntu-latest
python: '3.10'
# macOS
- os: macos-latest
python: '3.10'
# Windows
- os: windows-latest
python: '3.10'
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install pytest
pip install -e .
- name: Run Test
run: pytest -sv tests/testsuite.py
env:
CLEANUP_OK: ${{ !inputs.upload_data && 1 || 0 }}
CPP: ${{ inputs.cpp }}
- name: Upload generated data
if: ${{ inputs.upload_data && !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: out_${{ matrix.os }}_py${{ matrix.python }}
path: |
tests/tmp/
tests/common/