99
1010jobs :
1111 lab-01-intro-hello :
12- name : " Lab 01 - Intro: Calculator (10 pts)"
12+ name : " Lab 01 - Intro: Hello World (10 pts)"
1313 runs-on : ubuntu-latest
1414
1515 steps :
2929 - name : Run Lab 01 tests
3030 run : |
3131 cd 0_intro/01_hello
32- pytest -v --tb=short
32+ pytest test_hello.py -v --tb=short
3333
3434 lab-02-grasp-coupling :
3535 name : " Lab 02 - GRASP: Low Coupling (10 pts)"
@@ -52,10 +52,10 @@ jobs:
5252 - name : Run Lab 02 tests
5353 run : |
5454 cd 1_principles/01_grasp/04_low_coupling
55- pytest -v --tb=short
55+ pytest tests.py -v --tb=short
5656
5757 lab-03-solid-ocp :
58- name : " Lab 03 - SOLID: OCP (10 pts)"
58+ name : " Lab 03 - SOLID: Open/Closed Principle (10 pts)"
5959 runs-on : ubuntu-latest
6060
6161 steps :
@@ -75,13 +75,160 @@ jobs:
7575 - name : Run Lab 03 tests
7676 run : |
7777 cd 1_principles/02_solid/02_ocp
78- pytest -v --tb=short
78+ pytest tests.py -v --tb=short
79+
80+ lab-04-solid-dip :
81+ name : " Lab 04 - SOLID: Dependency Inversion (10 pts)"
82+ runs-on : ubuntu-latest
83+
84+ steps :
85+ - name : Checkout code
86+ uses : actions/checkout@v4
87+
88+ - name : Set up Python
89+ uses : actions/setup-python@v5
90+ with :
91+ python-version : ' 3.11'
92+
93+ - name : Install dependencies
94+ run : |
95+ python -m pip install --upgrade pip
96+ pip install -r requirements.txt
97+
98+ - name : Run Lab 04 tests
99+ run : |
100+ cd 1_principles/02_solid/05_dip
101+ pytest tests.py -v --tb=short
102+
103+ lab-05-factory-method :
104+ name : " Lab 05 - Pattern: Factory Method (10 pts)"
105+ runs-on : ubuntu-latest
106+
107+ steps :
108+ - name : Checkout code
109+ uses : actions/checkout@v4
110+
111+ - name : Set up Python
112+ uses : actions/setup-python@v5
113+ with :
114+ python-version : ' 3.11'
115+
116+ - name : Install dependencies
117+ run : |
118+ python -m pip install --upgrade pip
119+ pip install -r requirements.txt
120+
121+ - name : Run Lab 05 tests
122+ run : |
123+ cd 2_creational/01_factory_method
124+ pytest test_factory.py -v --tb=short
125+
126+ lab-06-abstract-factory :
127+ name : " Lab 06 - Pattern: Abstract Factory (10 pts)"
128+ runs-on : ubuntu-latest
129+
130+ steps :
131+ - name : Checkout code
132+ uses : actions/checkout@v4
133+
134+ - name : Set up Python
135+ uses : actions/setup-python@v5
136+ with :
137+ python-version : ' 3.11'
138+
139+ - name : Install dependencies
140+ run : |
141+ python -m pip install --upgrade pip
142+ pip install -r requirements.txt
143+
144+ - name : Run Lab 06 tests
145+ run : |
146+ cd 2_creational/02_abstract_factory
147+ pytest test_abstract_factory.py -v --tb=short
148+
149+ lab-07-singleton :
150+ name : " Lab 07 - Pattern: Singleton (10 pts)"
151+ runs-on : ubuntu-latest
152+
153+ steps :
154+ - name : Checkout code
155+ uses : actions/checkout@v4
156+
157+ - name : Set up Python
158+ uses : actions/setup-python@v5
159+ with :
160+ python-version : ' 3.11'
161+
162+ - name : Install dependencies
163+ run : |
164+ python -m pip install --upgrade pip
165+ pip install -r requirements.txt
166+
167+ - name : Run Lab 07 tests
168+ run : |
169+ cd 2_creational/05_singleton
170+ pytest test_basic.py -v --tb=short
171+
172+ lab-08-adapter :
173+ name : " Lab 08 - Pattern: Adapter (10 pts)"
174+ runs-on : ubuntu-latest
175+
176+ steps :
177+ - name : Checkout code
178+ uses : actions/checkout@v4
179+
180+ - name : Set up Python
181+ uses : actions/setup-python@v5
182+ with :
183+ python-version : ' 3.11'
184+
185+ - name : Install dependencies
186+ run : |
187+ python -m pip install --upgrade pip
188+ pip install -r requirements.txt
189+
190+ - name : Run Lab 08 tests
191+ run : |
192+ cd 3_structural/01_adapter
193+ pytest test_adapter.py -v --tb=short
194+
195+ lab-09-strategy :
196+ name : " Lab 09 - Pattern: Strategy (10 pts)"
197+ runs-on : ubuntu-latest
198+
199+ steps :
200+ - name : Checkout code
201+ uses : actions/checkout@v4
202+
203+ - name : Set up Python
204+ uses : actions/setup-python@v5
205+ with :
206+ python-version : ' 3.11'
207+
208+ - name : Install dependencies
209+ run : |
210+ python -m pip install --upgrade pip
211+ pip install -r requirements.txt
212+
213+ - name : Run Lab 09 tests
214+ run : |
215+ cd 4_behavioral/02_strategy
216+ pytest test_strategy.py -v --tb=short
79217
80218 # Summary job - pokazuje ogólny status
81219 summary :
82220 name : " Summary"
83221 runs-on : ubuntu-latest
84- needs : [lab-01-intro-hello, lab-02-grasp-coupling, lab-03-solid-ocp]
222+ needs :
223+ - lab-01-intro-hello
224+ - lab-02-grasp-coupling
225+ - lab-03-solid-ocp
226+ - lab-04-solid-dip
227+ - lab-05-factory-method
228+ - lab-06-abstract-factory
229+ - lab-07-singleton
230+ - lab-08-adapter
231+ - lab-09-strategy
85232 if : always()
86233
87234 steps :
@@ -90,7 +237,13 @@ jobs:
90237 echo "============================================"
91238 echo "Design Patterns Workshop - Test Summary"
92239 echo "============================================"
93- echo "Lab 01 - Intro Calculator : ${{ needs.lab-01-intro-hello.result }}"
240+ echo "Lab 01 - Intro Hello : ${{ needs.lab-01-intro-hello.result }}"
94241 echo "Lab 02 - GRASP Low Coupling: ${{ needs.lab-02-grasp-coupling.result }}"
95242 echo "Lab 03 - SOLID OCP: ${{ needs.lab-03-solid-ocp.result }}"
243+ echo "Lab 04 - SOLID DIP: ${{ needs.lab-04-solid-dip.result }}"
244+ echo "Lab 05 - Factory Method: ${{ needs.lab-05-factory-method.result }}"
245+ echo "Lab 06 - Abstract Factory: ${{ needs.lab-06-abstract-factory.result }}"
246+ echo "Lab 07 - Singleton: ${{ needs.lab-07-singleton.result }}"
247+ echo "Lab 08 - Adapter: ${{ needs.lab-08-adapter.result }}"
248+ echo "Lab 09 - Strategy: ${{ needs.lab-09-strategy.result }}"
96249 echo "============================================"
0 commit comments