File tree Expand file tree Collapse file tree 4 files changed +373
-7
lines changed
Expand file tree Collapse file tree 4 files changed +373
-7
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,40 @@ on: [push]
55jobs :
66
77 test_template :
8- runs-on : [ubuntu-latest, windows-latest, macos-latest]
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ vcs : [hg, git]
912 steps :
1013
14+ - name : Check out repository
15+ uses : actions/checkout@v5
16+
1117 - name : Set up python
12- uses : actions/setup-python@v4
18+ uses : actions/setup-python@v6
1319 with :
14- python-version : ' 3.12 '
20+ python-version-file : ' pyproject.toml '
1521
16- - name : Check out repository
17- uses : actions/checkout@v3
22+ - name : Install uv
23+ uses : astral-sh/setup-uv@v6
24+ with :
25+ version : " 0.9.8"
26+ enable-cache : true
27+
28+ - name : Install dependencies
29+ run : uv sync --locked --no-install-project
30+
31+ - name : Set authorship for git
32+ if : matrix.vcs == 'git'
33+ run : |
34+ git config --global init.defaultBranch main
35+ git config --global user.name "GitHub Actions"
36+ git config --global user.email "actions@github.com"
37+
38+ - name : Test template instantiation
39+ run : uv run make test
40+ env :
41+ VCS : ${{ matrix.vcs }}
1842
19- - name : Test
20- run : make test
43+ - name : Minimize uv cache
44+ run : uv cache prune --ci
Original file line number Diff line number Diff line change 11TARGET_NAME := "fastapi_complete"
22PYTHON_VERSION := $(shell python --version | sed -r -e 's/Python //' -e 's/\.[0-9]+$$//')
3+ VCS ?= hg
34
45test :
56 @echo Target: /tmp/$(TARGET_NAME )
1415 project_slug : \"$(TARGET_NAME ) \"\n\
1516 python_version : \"$(PYTHON_VERSION ) \"\n\
1617 line_length : 100\n\
18+ version_control : \"$(VCS ) \"\n\
1719 " > /tmp/$( TARGET_NAME) .yml
1820
1921 cookiecutter --no-input --config-file /tmp/$(TARGET_NAME).yml \
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " perfect-python-project"
3+ version = " 0.1.0"
4+ description = " This project template creates the basic structure for a Python project."
5+ authors = [
6+ {name =" André Miras" , email =" andre.miras@example.com" },
7+ ]
8+ readme = " README.rst"
9+ requires-python = " >=3.14"
10+ dependencies = [
11+ " cookiecutter" ,
12+ " mercurial" ,
13+ ]
You can’t perform that action at this time.
0 commit comments