Skip to content

unittests.yml: python setup.py install is deprecated #20

unittests.yml: python setup.py install is deprecated

unittests.yml: python setup.py install is deprecated #20

Workflow file for this run

name: Run unittests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# https://packaging.python.org/en/latest/discussions/setup-py-deprecated
# python setup.py install
pip install --editable .
- name: Run unittests
run: |
python tests/unit_tests.py
python tests/field_tests.py
python tests/csv_id_to_node_id_map_tests.py
- run: |
pip install pytest
# pytest discovery will autofind tests/test_*.py files...
# https://docs.pytest.org/en/stable/explanation/goodpractices.html#conventions-for-python-test-discovery
cd tests
mv csv_id_to_node_id_map_tests.py test_csv_id_to_node_id_map.py
mv field_tests.py test_fields.py
mv field_tests_values.py test_field_values.py
mv islandora_tests.py test_islandora.py
mv islandora_tests_check.py test_islandora_check.py
mv islandora_tests_hooks.py test_islandora_hooks.py
mv islandora_tests_paged_content.py test_islandora_paged_content.py
mv unit_tests.py test_unit.py
mv unit_tests_workbench_config.py test_unit_workbench_config.py
cd ..
pytest tests