Skip to content

Commit d3477d0

Browse files
author
Ran Isenberg
committed
add pipeline
1 parent 1726235 commit d3477d0

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Cookiecutter Template Test
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
PYTHON_VERSION: "3.13"
12+
13+
jobs:
14+
test-cookiecutter-template:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out repository code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
25+
- name: Install pipx
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install pipx
29+
30+
- name: Install Poetry
31+
run: |
32+
pipx install poetry
33+
34+
- name: Install Cookiecutter
35+
run: |
36+
pipx install cookiecutter
37+
38+
- name: Run Cookiecutter with predefined answers
39+
run: |
40+
# Create a cookiecutter-answers.json file with predefined answers
41+
cat > cookiecutter-answers.json << EOF
42+
{
43+
"repo_name": "test_serverless_service",
44+
"service_name": "test_service",
45+
"email": "test@example.com",
46+
"author": "Test User",
47+
"description": "A test serverless service for CI"
48+
}
49+
EOF
50+
51+
# Run cookiecutter with the answers file
52+
cookiecutter --no-input -f --config-file cookiecutter-answers.json .
53+
54+
- name: Set up Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '20'
58+
cache: 'npm'
59+
cache-dependency-path: 'test_serverless_service/package-lock.json'
60+
61+
- name: Run cybr pr command
62+
run: |
63+
cd test_serverless_service
64+
make dev
65+
make pr

0 commit comments

Comments
 (0)