forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 913 Bytes
/
py-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Python linting
on:
push:
branches:
- main
paths:
- pontoon/**.py
- .github/workflows/py-lint.yml
- requirements/lint.txt
pull_request:
branches:
- main
paths:
- pontoon/**.py
- .github/workflows/py-lint.yml
- requirements/lint.txt
workflow_dispatch:
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
version: "0.4.13"
- name: Install Dependencies
run: uv pip install -r requirements/lint.txt
env:
UV_SYSTEM_PYTHON: 1
- name: ruff lint
run: ruff check pontoon
- name: ruff format
run: ruff format --check pontoon