|
6 | 6 | pull_request: |
7 | 7 | branches: main |
8 | 8 |
|
| 9 | +env: |
| 10 | + PYTHON_VERSION: "3.11" |
| 11 | + UV_VERSION: "0.5.7" |
| 12 | + |
9 | 13 | jobs: |
10 | 14 | ruff: |
11 | | - runs-on: ${{ matrix.os }} |
12 | | - strategy: |
13 | | - matrix: |
14 | | - os: [ubuntu-latest] |
15 | | - python: [3.9] |
| 15 | + runs-on: ubuntu-latest |
16 | 16 | steps: |
17 | 17 | - uses: actions/checkout@v4 |
18 | 18 | - uses: actions/setup-python@v5 |
19 | 19 | with: |
20 | | - python-version: ${{ matrix.python }} |
| 20 | + python-version: ${{ env.PYTHON_VERSION }} |
21 | 21 | architecture: x64 |
22 | | - - uses: abatilo/actions-poetry@v3 |
| 22 | + - uses: astral-sh/setup-uv@v4 |
23 | 23 | with: |
24 | | - poetry-version: "1.8.2" |
25 | | - - name: Resolve dependencies |
26 | | - run: poetry export -f requirements.txt --without-hashes --only quality --output requirements.txt |
27 | | - - name: Install dependencies |
28 | | - run: | |
29 | | - python -m pip install --upgrade uv |
30 | | - uv pip install --system -r requirements.txt |
| 24 | + version: ${{ env.UV_VERSION }} |
31 | 25 | - name: Run ruff |
32 | 26 | run: | |
| 27 | + make install-quality |
33 | 28 | ruff --version |
34 | | - ruff check --diff . |
| 29 | + make lint-check |
35 | 30 |
|
36 | 31 | mypy: |
37 | | - runs-on: ${{ matrix.os }} |
38 | | - strategy: |
39 | | - matrix: |
40 | | - os: [ubuntu-latest] |
41 | | - python: [3.9] |
| 32 | + runs-on: ubuntu-latest |
42 | 33 | steps: |
43 | 34 | - uses: actions/checkout@v4 |
44 | 35 | - uses: actions/setup-python@v5 |
45 | 36 | with: |
46 | | - python-version: ${{ matrix.python }} |
| 37 | + python-version: ${{ env.PYTHON_VERSION }} |
47 | 38 | architecture: x64 |
48 | | - - uses: abatilo/actions-poetry@v3 |
| 39 | + - uses: astral-sh/setup-uv@v4 |
49 | 40 | with: |
50 | | - poetry-version: "1.8.2" |
51 | | - - name: Resolve dependencies |
52 | | - run: poetry export -f requirements.txt --without-hashes --with quality --output requirements.txt |
53 | | - - name: Install dependencies |
54 | | - run: | |
55 | | - python -m pip install --upgrade uv |
56 | | - uv pip install --system -r requirements.txt |
| 41 | + version: ${{ env.UV_VERSION }} |
57 | 42 | - name: Run mypy |
58 | 43 | run: | |
| 44 | + make install-quality |
59 | 45 | mypy --version |
60 | | - mypy |
61 | | -
|
62 | | - ruff-format: |
63 | | - runs-on: ${{ matrix.os }} |
64 | | - strategy: |
65 | | - matrix: |
66 | | - os: [ubuntu-latest] |
67 | | - python: [3.9] |
68 | | - steps: |
69 | | - - uses: actions/checkout@v4 |
70 | | - - uses: actions/setup-python@v5 |
71 | | - with: |
72 | | - python-version: ${{ matrix.python }} |
73 | | - architecture: x64 |
74 | | - - uses: abatilo/actions-poetry@v3 |
75 | | - with: |
76 | | - poetry-version: "1.8.2" |
77 | | - - name: Resolve dependencies |
78 | | - run: poetry export -f requirements.txt --without-hashes --only quality --output requirements.txt |
79 | | - - name: Install dependencies |
80 | | - run: | |
81 | | - python -m pip install --upgrade uv |
82 | | - uv pip install --system -r requirements.txt |
83 | | - - name: Run ruff |
84 | | - run: | |
85 | | - ruff --version |
86 | | - ruff format --check --diff . |
| 46 | + make typing-check |
87 | 47 |
|
88 | 48 | precommit-hooks: |
89 | | - runs-on: ${{ matrix.os }} |
90 | | - strategy: |
91 | | - matrix: |
92 | | - os: [ubuntu-latest] |
93 | | - python: [3.9] |
| 49 | + runs-on: ubuntu-latest |
94 | 50 | steps: |
95 | 51 | - uses: actions/checkout@v4 |
96 | 52 | - uses: actions/setup-python@v5 |
97 | 53 | with: |
98 | | - python-version: ${{ matrix.python }} |
| 54 | + python-version: ${{ env.PYTHON_VERSION }} |
99 | 55 | architecture: x64 |
100 | | - - uses: abatilo/actions-poetry@v3 |
| 56 | + - uses: astral-sh/setup-uv@v4 |
101 | 57 | with: |
102 | | - poetry-version: "1.8.2" |
103 | | - - name: Resolve dependencies |
104 | | - run: poetry export -f requirements.txt --without-hashes --only quality --output requirements.txt |
105 | | - - name: Install dependencies |
106 | | - run: | |
107 | | - python -m pip install --upgrade uv |
108 | | - uv pip install --system -r requirements.txt |
| 58 | + version: ${{ env.UV_VERSION }} |
109 | 59 | - name: Run pre-commit hooks |
110 | 60 | run: | |
| 61 | + make install-quality |
111 | 62 | git checkout -b temp |
112 | 63 | pre-commit install |
113 | 64 | pre-commit --version |
114 | | - pre-commit run --all-files |
| 65 | + make precommit |
0 commit comments