feature 0.3.8 #160
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: esgf-playground-utils-check | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Clear coverage | |
run: | | |
poetry install --with test | |
poetry run python -m coverage erase | |
- name: Run tests | |
run: | | |
poetry run python -m coverage erase | |
poetry run python -m coverage run -m unittest discover | |
- name: Check coverage | |
run: | | |
poetry run python -m coverage report | |
quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'poetry' | |
- name: Install Dependencies | |
run: | | |
poetry env use 3.12 | |
- name: Check Poetry | |
run: | | |
poetry check --lock | |
- name: Run black | |
run: | | |
poetry install --only black | |
poetry run black ./ --verbose --check | |
- name: Run bandit | |
run: | | |
poetry install --only bandit | |
poetry run bandit -c pyproject.toml -r . | |
- name: Run isort | |
run: | | |
poetry install --only isort | |
poetry run isort . --check | |
- name: Run ruff | |
run: | | |
poetry install --only ruff | |
poetry run ruff check | |
- name: Run audit | |
run: | | |
pipx inject poetry poetry-audit-plugin | |
poetry audit $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); ignore_codes = data['tool']['quality']['audit']['ignore-code']; print('--ignore-code=' + ','.join(ignore_codes)) if ignore_codes else print('')") | |
- name: Run xenon | |
run: | | |
poetry install --only xenon | |
poetry run xenon -a $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['average'])") -b $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['block'])") -m $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['module'])") . | |
- name: Run mypy | |
run: | | |
poetry install --with mypy | |
poetry run mypy . | |
- name: Run sphinx | |
run: | | |
poetry install --with docs | |
poetry run sphinx-build -M dummy ./docs ./docs/_build -W -a |