Modernize project tooling and align urllib3 usage with best practices #76
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: Development | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '**.py' | |
| - '!docs/**' | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Disabling shallow clone for SonarCloud | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: make develop | |
| - name: Code Linting | |
| run: make lint | |
| - name: Code Formatting | |
| run: make format | |
| - name: Type Checking | |
| run: make typecheck | |
| - name: Code Testing | |
| if: matrix.python-version == '3.10' | |
| run: make test-report | |
| - name: SonarQube Scan | |
| if: matrix.python-version == '3.10' | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| args: > | |
| -Dsonar.organization=johnbrandborg | |
| -Dsonar.projectKey=johnbrandborg_cruds | |
| -Dsonar.python.coverage.reportPaths=coverage.xml | |
| -Dsonar.python.version=${{ matrix.python-version }} | |
| -Dsonar.sources=src/ | |
| -Dsonar.test.exclusions=tests/** | |
| -Dsonar.tests=tests/ |