File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Setup Script
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - devel
8+ pull_request :
9+ branches :
10+ - main
11+ - devel
12+
13+ defaults :
14+ run :
15+ shell : bash
16+
17+ jobs :
18+ test-setup-script :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : ' 3.10'
28+
29+ - name : Run setup script
30+ run : |
31+ bash setup_project.sh my-test-app
32+
33+ - name : Verify changes
34+ run : |
35+ # Check that src/app was moved to src/my_test_app
36+ if [ ! -d "src/my_test_app" ]; then
37+ echo "Error: src/my_test_app does not exist"
38+ exit 1
39+ fi
40+
41+ # Check that src/app no longer exists
42+ if [ -d "src/app" ]; then
43+ echo "Error: src/app still exists"
44+ exit 1
45+ fi
46+
47+ # Check that testproject was replaced in pyproject.toml
48+ if grep -q "testproject" pyproject.toml; then
49+ echo "Error: 'testproject' still found in pyproject.toml"
50+ exit 1
51+ fi
52+
53+ if ! grep -q "my-test-app" pyproject.toml; then
54+ echo "Error: 'my-test-app' not found in pyproject.toml"
55+ exit 1
56+ fi
57+
58+ echo "✓ All checks passed!"
59+
60+ - name : Install project with new name
61+ run : |
62+ pip install --upgrade pip
63+ pip install -e .
64+
65+ - name : Test renamed command works
66+ run : |
67+ my-test-app
Original file line number Diff line number Diff line change 4444 pip install --upgrade pip
4545 pip install ".[dev]"
4646
47- - name : Check installation
48- run : |
49- template-python
50-
5147 - name : Run tests
5248 run : |
5349 pytest .
6359 make clean
6460 make html
6561 cd ..
66- ls docs/build/html/index.html
62+ ls docs/build/html/index.html
You can’t perform that action at this time.
0 commit comments