test: Add test for invalid MF with strict validation disabled #527
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
os: [ubuntu-20.04, macos-12, windows-2019] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.8.4 | |
- name: Install Dependencies (Pure Python) | |
run: poetry install -v --without dev,docs | |
- name: Run Tests (Pure Python with coverage) | |
run: poetry run pytest --cov=iscc_core --cov-report=xml -q tests | |
- name: Build Extension modules | |
run: poetry install -v --without dev,docs --extras turbo | |
- name: Run Tests (With Extension Modules) | |
run: poetry run pytest -q tests --turbo | |
- name: Benchmark (With Extension Modules) | |
run: poetry run python ./tests/benchmark.py | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.9' | |
- name: Build Wheel | |
run: poetry build -f wheel | |
- name: Test Wheel Installation | |
if: runner.os != 'Windows' | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install dist/*.whl | |
python -c "import iscc_core; iscc_core.conformance_selftest()" | |
python -c "import iscc_core; print(iscc_core.turbo())" | |
- name: Test Wheel Installation on Windows | |
if: runner.os == 'Windows' | |
run: | | |
python -m venv venv | |
venv\Scripts\Activate.ps1 | |
$wheelFile = (Get-ChildItem dist/*.whl -Name) | |
pip install "dist/$wheelFile" | |
python -c "import iscc_core; iscc_core.conformance_selftest()" | |
python -c "import iscc_core; print(iscc_core.turbo())" | |
- name: Collect Wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
merge: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Merge Artifacts | |
uses: actions/upload-artifact/merge@v4 |