Merge pull request #41 from microsoft/dependabot/pip/idna-3.15 #9
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| 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 Poetry | |
| run: pipx install poetry | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Lint | |
| run: | | |
| poetry run pylint --rcfile=pylintrc xcodeproj | |
| poetry run pylint --rcfile=pylintrc tests | |
| - name: Type Check | |
| run: poetry run mypy xcodeproj/ tests/ | |
| - name: Test | |
| run: poetry run pytest tests --cov=xcodeproj --cov-report xml --doctest-modules --junitxml=junit/test-results.xml | |
| - name: Coverage summary | |
| if: always() | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| with: | |
| filename: coverage.xml | |
| format: markdown | |
| output: both | |
| - name: Add coverage to job summary | |
| if: always() | |
| run: cat code-coverage-results.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Add coverage PR comment | |
| if: always() && github.event_name == 'pull_request' | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| path: code-coverage-results.md | |
| header: coverage-${{ matrix.python-version }} | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.python-version }} | |
| path: junit/test-results.xml |