@@ -3,37 +3,72 @@ name: "Lint"
33on :
44 push :
55 paths :
6- - ' **.py' # Run if pushed commits include a change to a Python (.py) file.
7- - ' .github/workflows/lint.yml' # Run if pushed commits include a change to a github actions workflow file.
8- - ' requirements.txt' # Run if pushed commits include a change to the Python requirements.txt file.
9- - ' .pyprogject.toml' # Run if project configuration file changes.
6+ - " **.py" # Run if pushed commits include a change to a Python (.py) file.
7+ - " .github/workflows/lint.yml" # Run if pushed commits include a change to a github actions workflow file.
8+ - " pyproject.toml" # Run if project configuration file changes.
109 pull_request :
1110 paths :
12- - ' **.py' # Run if pushed commits include a change to a Python (.py) file.
13- - ' .github/workflows/lint.yml' # Run if pushed commits include a change to a github actions workflow file.
14- - ' requirements.txt' # Run if pushed commits include a change to the Python requirements.txt file.
15- - ' .pyprogject.toml' # Run if project configuration file changes.
11+ - " **.py" # Run if pushed commits include a change to a Python (.py) file.
12+ - " .github/workflows/lint.yml" # Run if pushed commits include a change to a github actions workflow file.
13+ - " pyproject.toml" # Run if project configuration file changes.
1614 workflow_dispatch :
1715
1816jobs :
19- build :
20- runs-on : " ubuntu-latest"
21- strategy :
22- matrix :
23- python-version : ["3.13"]
17+ ruff_check :
18+ runs-on : ubuntu-latest
19+
2420 steps :
25- - name : Checkout repo
26- uses : actions/checkout@v5
21+ - name : Checkout code
22+ uses : actions/checkout@v5
23+
24+ - name : Ruff Check
25+ uses : astral-sh/ruff-action@v3
26+ with :
27+ args : check --output-format=github
28+
29+ - name : Ruff Format
30+ uses : astral-sh/ruff-action@v3
31+ with :
32+ args : format --check --diff
33+
34+ # mypy:
35+ # runs-on: ubuntu-latest
36+
37+ # steps:
38+ # - name: Checkout code
39+ # uses: actions/checkout@v5
40+
41+ # - name: Install uv
42+ # uses: astral-sh/setup-uv@v5
43+
44+ # - name: Set up Python
45+ # uses: actions/setup-python@v5
46+ # with:
47+ # python-version-file: "pyproject.toml"
48+
49+ # - name: Install dependencies
50+ # run: uv sync
51+
52+ # - name: Run mypy
53+ # run: uv run mypy
54+
55+ tests :
56+ runs-on : ubuntu-latest
57+
58+ steps :
59+ - name : Checkout code
60+ uses : actions/checkout@v5
61+
62+ - name : Install uv
63+ uses : astral-sh/setup-uv@v5
2764
28- - name : Set up Python ${{ matrix.python-version }}
29- uses : actions/setup-python@v6
30- with :
31- python-version : ${{ matrix. python-version }}
65+ - name : Set up Python
66+ uses : actions/setup-python@v5
67+ with :
68+ python-version-file : " pyproject.toml "
3269
33- - name : Install dependencies from requirements.txt
34- run : |
35- if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
70+ - name : Install dependencies
71+ run : uv sync
3672
37- - name : Analyse the code with ruff
38- run : |
39- python3 -m ruff check .
73+ - name : Run tests
74+ run : uv run pytest
0 commit comments