Skip to content

Francescalb/testing dependencies #483

Francescalb/testing dependencies

Francescalb/testing dependencies #483

Workflow file for this run

name: CI - Tests
on:
pull_request:
push:
branches:
- 'master'
- 'push-action/**' # Allow pushing to protected branches (using CasperWA/push-protected)
jobs:
basic-tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v1
with:
# General settings:
install_extras: "[dev]"
# pre-commit
run_pre-commit: true
python_version_pre-commit: "3.8"
skip_pre-commit_hooks: pylint,pylint-tests
# pylint & safety
python_version_pylint_safety: "3.7"
run_pylint: true
pylint_runs: |
--rcfile=pyproject.toml tripper
--rcfile=pyproject.toml --disable=import-outside-toplevel,redefined-outer-name tests
run_safety: true
# 48547: RDFLib vulnerability: https://pyup.io/vulnerabilities/PVE-2022-48547/48547/
# 44715-44717: NumPy vulnerabilities:
# https://pyup.io/vulnerabilities/CVE-2021-41495/44715/
# https://pyup.io/vulnerabilities/CVE-2021-41496/44716/
# https://pyup.io/vulnerabilities/CVE-2021-34141/44717/
safety_options: |
--ignore=48547
--ignore=44715
--ignore=44716
--ignore=44717
# Build package
run_build_package: true
python_version_package: "3.7"
build_libs: flit
build_cmd: flit build
# Build documentation
run_build_docs: true
python_version_docs: "3.7"
update_python_api_ref: true
update_docs_landing_page: true
package_dirs: tripper
pytest-simple:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout tripper
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install graphviz
python -m pip install -U pip
pip install -U setuptools wheel flit
pip install -e .[testing]
- name: Test with pytest
run: pytest -vvv --cov-report=xml --doctest-modules
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9' && github.repository == 'EMMC-ASBL/tripper'
uses: codecov/codecov-action@v3
- name: Run doctest on tutorial
run: |
python -m doctest docs/tutorial.md
pytest: # Test for basic version, without extras installed
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout tripper
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install graphviz
python -m pip install -U pip
pip install -U setuptools wheel flit
pip install -e .
- name: Test with pytest
run: pytest -vvv