This repository was archived by the owner on Mar 5, 2026. It is now read-only.
Fix/payments home #23
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 will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Pyright Linter | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies with uv | |
| run: | | |
| uv sync --no-dev | |
| uv pip install pyright pytest | |
| continue-on-error: true | |
| - name: Fallback to pip if uv fails | |
| if: failure() | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyright pytest | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Lint with pyright | |
| id: pyright-check | |
| run: | | |
| uv run pyright --project pyrightconfig.json --level error > pyright-report.txt | |
| continue-on-error: true | |
| - name: Upload pyright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: pyright-report | |
| path: pyright-report.txt | |
| retention-days: 30 | |
| - name: Display pyright results | |
| if: always() | |
| run: | | |
| echo "Pyright linting results:" | |
| cat pyright-report.txt | |
| - name: Fail job if pyright found errors | |
| if: steps.pyright-check.outcome == 'failure' | |
| run: exit 1 | |
| # - name: Test with pytest | |
| # run: | | |
| # pytest tets/* |