Skip to content

Commit c89a708

Browse files
committed
Test setup script
1 parent 82a0fff commit c89a708

2 files changed

Lines changed: 68 additions & 5 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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

.github/workflows/testing.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ jobs:
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 .
@@ -63,4 +59,4 @@ jobs:
6359
make clean
6460
make html
6561
cd ..
66-
ls docs/build/html/index.html
62+
ls docs/build/html/index.html

0 commit comments

Comments
 (0)