Skip to content

Commit 505b510

Browse files
author
Ran Isenberg
committed
a
1 parent 1f18c65 commit 505b510

File tree

2 files changed

+4
-45
lines changed

2 files changed

+4
-45
lines changed

.github/workflows/cookiecutter-test.yml

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -55,58 +55,17 @@ jobs:
5555
SESSION_NAME: "github-${{github.sha}}-dev"
5656
- name: Run Cookiecutter with predefined answers
5757
run: |
58-
# Create a cookiecutter-answers.json file with predefined answers
59-
cat > cookiecutter-answers.json << EOF
60-
{
61-
"repo_name": "test_serverless_service",
62-
"service_name": "test_service",
63-
"email": "test@example.com",
64-
"author": "Test User",
65-
"description": "A test serverless service for CI"
66-
}
67-
EOF
68-
69-
# Run cookiecutter with the answers file
70-
poetry run cookiecutter --no-input -f --config-file cookiecutter-answers.json .
71-
72-
# List the created directories for debugging
73-
echo "Listing directories in current path:"
74-
ls -la
58+
poetry run cookiecutter --no-input
7559
- name: Set up Node
7660
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
7761
with:
7862
node-version: ${{ env.NODE_VERSION }}
7963
cache: "npm"
8064
- name: Run make pr command
8165
run: |
82-
# Check what directories are available before trying to enter
83-
echo "Available directories:"
84-
ls -la
85-
86-
# Try to find the generated directory
87-
GENERATED_DIR=$(find . -maxdepth 1 -type d -not -path "*/\.*" -not -path "." | head -1)
88-
89-
if [ -z "$GENERATED_DIR" ]; then
90-
echo "No generated directory found. Cookiecutter may have failed."
91-
exit 1
92-
fi
93-
94-
echo "Found generated directory: $GENERATED_DIR"
95-
cd "$GENERATED_DIR"
96-
echo "Now in directory: $(pwd)"
97-
ls -la
98-
66+
cd my_serverless_service
9967
make pr
10068
- name: Destroy stack
10169
if: always()
10270
run: |
103-
# Try to find the generated directory
104-
GENERATED_DIR=$(find . -maxdepth 1 -type d -not -path "*/\.*" -not -path "." | head -1)
105-
106-
if [ -n "$GENERATED_DIR" ]; then
107-
echo "Cleaning up in directory: $GENERATED_DIR"
108-
cd "$GENERATED_DIR"
109-
make destroy
110-
else
111-
echo "No generated directory found, nothing to destroy."
112-
fi
71+
make destroy

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"repo_name": "my_serverless_service",
3-
"service_name": "service",
3+
"service_name": "myservice",
44
"email": "dummy@dummy.com",
55
"author": "Dr. Myfull Name",
66
"description": "My serverless service description",

0 commit comments

Comments
 (0)