File tree 1 file changed +31
-29
lines changed
template/py/{{cookiecutter.project_slug}}/.github/workflows
1 file changed +31
-29
lines changed Original file line number Diff line number Diff line change 7
7
pull_request :
8
8
workflow_dispatch :
9
9
10
- {% raw %}
11
10
jobs :
12
- build-and-test :
13
- name : python-${{ matrix.os }}
11
+ lint :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Set up UV Environment
18
+ uses : astral-sh/setup-uv@v3
19
+ with :
20
+ version : " latest"
21
+
22
+ - name : Format Code
23
+ run : uvx ruff format --diff .
24
+
25
+ - name : Lint Code
26
+ run : uvx ruff check .
14
27
28
+ build-and-test :
29
+ runs-on : {{ "${{ matrix.os }}" }}
15
30
strategy :
16
31
matrix :
17
- os :
18
- - ubuntu-latest
19
- - windows-latest
20
- - macos-latest
21
-
32
+ os : [ubuntu-latest, macos-latest, windows-latest]
22
33
fail-fast : false
23
34
24
- runs-on : ${{ matrix.os }}
25
-
26
35
steps :
27
- - uses : actions/checkout@v4
36
+ - name : Checkout repository
37
+ uses : actions/checkout@v4
28
38
29
- - name : Set up uv
30
- if : ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
31
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
39
+ - name : Set up UV Environment
40
+ uses : astral-sh/setup-uv@v3
41
+ with :
42
+ version : " latest"
32
43
33
- - name : Set up uv
34
- if : ${{ matrix.os == 'windows-latest' }}
35
- run : irm https://astral.sh/uv/install.ps1 | iex
36
- shell : powershell
44
+ - name : Synchronize Dependencies
45
+ run : uv sync
37
46
38
- - name : Format
39
- run : uvx ruff format --diff .
40
-
41
- - name : Lint
42
- run : uvx ruff check .
47
+ - name : Build Project
48
+ run : uvx hatch build
43
49
44
- - name : Build & Test
45
- run : |
46
- uv sync
47
- uvx hatch build
48
- uvx hatch test
49
- {% endraw -%}
50
+ - name : Run Tests
51
+ run : uvx hatch test
You can’t perform that action at this time.
0 commit comments