Merge pull request #422 from heplesser/remove-pathlib #98
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: run-tests | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
jobs: | |
linux_tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install . install | |
pip install -r requirements-test.txt | |
- name: Run tests | |
run: pytest | |
# The default Linux Ubuntu 22+ does not support Python < 3.8 any longer | |
# To keep testing Python < 3.8, use Ubuntu 20 | |
linux_legacy_tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ["3.7"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install . install | |
pip install -r requirements-test.txt | |
- name: Run tests | |
run: pytest | |
mac_tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
# github actions currently resolves the pyyaml pip install package | |
# for python 3.9 not to the required macos package, but to the | |
# default pyyaml 6.0.tar package, which is a linux distribution | |
# and fails on install. MacOS Python version 3.9 build will stay | |
# disabled until this is resolved. | |
#python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
python-version: ["3.7", "3.8", "3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install . | |
pip install -r requirements-test.txt | |
- name: Run tests | |
run: pytest | |
# The current rdflib dependency causes random issues on some of | |
# the github actions windows builds; since the appveyor builds | |
# are passing without any issue, keep most gh actions windows | |
# builds deactivated until the rdflib dependency has been | |
# been updated. | |
win_tests: | |
continue-on-error: true | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install . | |
pip install -r requirements-test.txt | |
- name: Run tests | |
run: pytest | |
run-coverall: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install . | |
pip install -r requirements-test.txt | |
pip install pytest coveralls | |
- name: Create coverage | |
run: | | |
coverage run --source=odml -m pytest test/ | |
- name: Submit to coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --service=github | |
run-codecov: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install . | |
pip install -r requirements-test.txt | |
pip install pytest pytest-cov | |
- name: Create coverage | |
run: | | |
pytest --cov=./ --cov-report=xml | |
- uses: codecov/codecov-action@v1 | |
with: | |
name: Submit Codecov coverage | |
files: ./coverage.xml | |
verbose: true # optional (default = false) |