Refine and extend data models for capturing uncertainty statistics (#60) #102
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: EYA DEF tools linting and testing | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{matrix.python-version}} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Update apt-get | |
run: sudo apt-get update | |
- name: Install graphviz | |
run: sudo apt-get install graphviz graphviz-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r eya_def_tools/requirements.txt | |
pip install -r eya_def_tools/requirements-dev.txt | |
pip install -r eya_def_tools/requirements-erd.txt | |
- name: Install eya_def_tools Python package | |
run: | | |
# Need to update this to copy JSON Schema file and not use editable install | |
pip install -e eya_def_tools[dev,erd] | |
- name: Lint with flake8 | |
run: | | |
flake8 eya_def_tools --toml-config=eya_def_tools/pyproject.toml --count --show-source --statistics | |
- name: Run static type checking with mypy | |
run: | | |
mypy --config-file eya_def_tools/pyproject.toml | |
- name: Test with pytest | |
run: | | |
pytest --pyargs eya_def_tools --rootdir=eya_def_tools --cov-fail-under=95 |