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