File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : test-cookiecutter-template
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+
15+ env :
16+ PYTHON_VERSION : " 3.13"
17+ # Matches the default in the cookiecutter.json.
18+ DEFAULT_PACKAGE_NAME : " package_name"
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ${{ env.PYTHON_VERSION }}
27+
28+ - name : Create cookiecutter package
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install cookiecutter
32+ cookiecutter . --no-input
33+
34+ - name : Test cookiecutter package
35+ run : |
36+ cd ${{ env.DEFAULT_PACKAGE_NAME }}
37+ python -m venv .venv
38+ source .venv/bin/activate
39+ pip install -e ".[dev]"
40+ # Make sure unit tests pass.
41+ pytest
42+ # Check the CLI works.
43+ ${{ env.DEFAULT_PACKAGE_NAME }} --help
You can’t perform that action at this time.
0 commit comments