1- # Taken from Xee and minimally modified: https://github.com/google/Xee/blob/main/.github/workflows/lint.yml
2- #
3- # Copyright 2023 Google LLC
4- #
5- # Licensed under the Apache License, Version 2.0 (the "License");
6- # you may not use this file except in compliance with the License.
7- # You may obtain a copy of the License at
8- #
9- # https://www.apache.org/licenses/LICENSE-2.0
10- #
11- # Unless required by applicable law or agreed to in writing, software
12- # distributed under the License is distributed on an "AS IS" BASIS,
13- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14- # See the License for the specific language governing permissions and
15- # limitations under the License.
16- # ==============================================================================
171name : lint
182
193on :
@@ -34,19 +18,10 @@ jobs:
3418 matrix :
3519 python-version : ["3.9", "3.13"]
3620 steps :
37- - name : Cancel previous
38- uses : styfle/cancel-workflow-action@0.7.0
39- with :
40- access_token : ${{ github.token }}
41- if : ${{github.ref != 'refs/head/main'}}
42- - uses : actions/checkout@v2
43- - name : Set up Python ${{ matrix.python-version }}
44- uses : actions/setup-python@v2
21+ - uses : actions/checkout@v4
22+ - name : Install uv and set the python version
23+ uses : astral-sh/setup-uv@v5
4524 with :
4625 python-version : ${{ matrix.python-version }}
47- - name : Install linter
48- run : |
49- pip install pyink
5026 - name : Lint with pyink
51- run : |
52- pyink --check .
27+ run : uvx pyink --check .
0 commit comments