[pre-commit.ci] pre-commit autoupdate (#30) #82
Workflow file for this run
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: CI - Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
- 'develop' | |
jobs: | |
basics: | |
name: External | |
uses: SINTEF/ci-cd/.github/workflows/[email protected] | |
with: | |
# General | |
install_extras: '[dev]' | |
# pre-commit | |
run_pre-commit: false # Uses pre-commit.ci (see config file .pre-commit-config.yaml) | |
# pylint & safety | |
python_version_pylint_safety: '3.9' | |
run_pylint: false | |
run_safety: true | |
# ID: 70612 | |
# Package: Jinja2 | |
# Has been disputed by the maintainer and multiple third parties. | |
# For more information see: https://github.com/advisories/GHSA-f6pv-j8mr-w6rr | |
safety_options: | | |
--ignore=70612 | |
# Build Python package | |
run_build_package: true | |
python_version_package: '3.9' | |
build_libs: flit | |
build_cmd: flit build | |
# Documentation | |
run_build_docs: false | |
pytest: | |
name: pytest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Supported Python versions (according to pyproject.toml) | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- name: Checkout repository | |
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 -U pip | |
pip install -U setuptools wheel | |
pip install -e .[testing] | |
- name: Run pytest | |
run: pytest -v -rs --cov=s7 --cov-report=xml --cov-report=term-missing | |
- name: Upload code coverage report | |
if: github.repository == 'SINTEF/soft7' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
flags: pytest |