diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8913fc7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + +jobs: + lint: + name: Run on Ubuntu + runs-on: ubuntu-latest + + steps: + - name: Clone the code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install uv + run: | + curl -LsSf 'https://astral.sh/uv/install.sh' | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install dependencies using uv + run: | + # Install dependencies using uv with the lock file and the --system flag + uv pip install --system . ruff + + - name: Run linter + run: | + ruff check . + ruff format --check .