Prepare package for PyPI publication as pythonstl v0.1.0 #4
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: Python Tests and Linting | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install pytest pytest-cov mypy flake8 | |
| - name: Run flake8 | |
| run: | | |
| flake8 pythonstl/ --count --show-source --statistics | |
| - name: Run mypy | |
| run: | | |
| mypy pythonstl/ --ignore-missing-imports | |
| continue-on-error: true | |
| - name: Run tests with coverage | |
| run: | | |
| pytest tests/ --cov=pythonstl --cov-report=xml --cov-report=term | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v3 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false |