Merge pull request #49 from Shubhamx404/fix-malformed-xml-test #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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.10.8" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.10 && uv venv --python 3.10 | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: Run Ruff Check | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| git fetch origin main | |
| git diff --diff-filter=ACMR --name-only -z origin/main...HEAD -- '*.py' \ | |
| | xargs -0 -r uv run ruff check -- | |
| else | |
| uv run ruff check . | |
| fi | |
| - name: Run Ruff Format | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| git fetch origin main | |
| git diff --diff-filter=ACMR --name-only -z origin/main...HEAD -- '*.py' \ | |
| | xargs -0 -r uv run ruff format --check -- | |
| else | |
| uv run ruff format --check . | |
| fi |