fix: flake8 and isort linting #131
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
| # This workflow installs dependencies, runs examples and tests (lint is in code-quality workflow) | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: pymdoccbor | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| pull_request: | |
| branches: [ "*" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.10' | |
| - "3.11" | |
| - "3.12" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system package | |
| run: | | |
| sudo apt update | |
| sudo apt install python3-dev libssl-dev libffi-dev make automake gcc g++ | |
| - name: Create venv and install | |
| run: | | |
| python -m venv env | |
| source env/bin/activate | |
| pip install --upgrade pip setuptools | |
| if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| if [ -f requirements-customizations.txt ]; then pip install -r requirements-customizations.txt; fi | |
| pip install -e . | |
| - name: Run examples | |
| run: | | |
| source env/bin/activate | |
| chmod +x scripts/run_examples.sh | |
| ./scripts/run_examples.sh | |
| - name: Run README and docs examples | |
| run: | | |
| source env/bin/activate | |
| python scripts/run_doc_examples.py | |
| - name: Tests with coverage | |
| run: | | |
| source env/bin/activate | |
| pytest --cov=pymdoccbor --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false |