Add missing endpoints #26
Workflow file for this run
This file contains hidden or 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: Continuous Integration | |
| env: | |
| PACKAGE: webgeocalc | |
| PYTHON: 3.11 | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**.py' | |
| - '!**/version.py' | |
| - '.github/workflows/actions.yml' | |
| jobs: | |
| flake8: | |
| name: Linter - flake8 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.PYTHON }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ env.PYTHON }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 flake8-colors flake8-docstrings flake8-import-order pep8-naming mccabe | |
| - name: Run flake8 | |
| run: flake8 setup.py docs/conf.py $PACKAGE/ tests/ | |
| pylint: | |
| name: Linter - Pylint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.PYTHON }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ env.PYTHON }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . pylint pytest | |
| - name: Run pylint | |
| run: pylint $PACKAGE/ tests/*.py | |
| bandit: | |
| name: Linter - Bandit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.PYTHON }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ env.PYTHON }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install bandit | |
| - name: Run bandit | |
| run: | | |
| bandit -r $PACKAGE | |
| bandit -r tests --skip B101 | |
| tests: | |
| name: Unit tests, coverage and notebooks | |
| needs: [flake8, pylint] | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTEST_ADDOPTS: --color=yes | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ env.PYTHON }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ env.PYTHON }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install pytest requests_mock pytest-cov codecov nbval | |
| - name: Run unit-tests with coverage | |
| run: pytest --cov=$PACKAGE tests/ | |
| - name: Push coverage to codecov | |
| run: codecov | |
| - name: Run jupyter notebook tests | |
| run: pytest --nbval-lax examples/ | |
| docs: | |
| name: Docs | |
| needs: [flake8, pylint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . -r docs/requirements.txt | |
| - name: Build docs | |
| run: sphinx-build docs docs/_build --color -W -bhtml | |
| - name: Run doctests in docstrings | |
| run: sphinx-build docs docs/_build --color -W -bdoctest |