Fix CI: Use uv run for pytest to access venv packages #757
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: json2xml linters.yml | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ruff: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Set up Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: "3.13" | |
| cache: 'pip' | |
| - run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Run Ruff | |
| run: | | |
| ruff check json2xml | |
| ruff check tests | |
| typecheck: | |
| name: ty typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Set up Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install -e . | |
| - name: Run ty | |
| run: | | |
| source .venv/bin/activate | |
| uvx ty check json2xml tests |