Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a9b672d
Merge branch 'main' into lesson-3
blcheng Aug 12, 2022
39ca468
adding completed total function
blcheng Aug 12, 2022
3d88ddd
update unit test
blcheng Aug 12, 2022
25d96e4
update mock api for tax/total api
blcheng Aug 12, 2022
71fd5e7
adding test-coverage script
blcheng Sep 26, 2022
0a1bc2b
simplify the tests
blcheng Oct 27, 2022
c9f8e60
propogate lesson 2 test changes
blcheng Oct 27, 2022
d78f4cc
remove neg test, seed order tests.
blcheng Oct 27, 2022
33f2328
refactor mocks
blcheng Oct 27, 2022
9e34627
update cypress tests.
blcheng Nov 15, 2022
71b0396
lowercase s
blcheng Nov 15, 2022
7e2b93a
Update lesson-3.yaml
John-J-Riehl Feb 5, 2023
f7c9d16
Update constants.js
John-J-Riehl Feb 5, 2023
f30ba6e
Merge pull request #8 from John-J-Riehl/lesson-3
John-J-Riehl Feb 6, 2023
fe6d055
New API URL
John-J-Riehl Feb 24, 2023
953896c
New API URL
John-J-Riehl Feb 24, 2023
3112b36
Update lesson-3.yaml
John-J-Riehl Mar 2, 2023
831ca48
updated GHA versions, removed node-sass
John-J-Riehl Aug 12, 2024
3165886
Update spec.cy.js
John-J-Riehl Aug 14, 2025
2057788
Update spec.cy.js
John-J-Riehl Aug 14, 2025
2e704ab
Update lesson-6.yaml
John-J-Riehl Aug 15, 2025
2af9ef2
added legacy-cgi module
John-J-Riehl Sep 4, 2025
e88f077
added sass package
John-J-Riehl Sep 4, 2025
9c67a69
Add function_test job to CI/CD pipeline
LilianNwacukwu Nov 15, 2025
dedbe69
Add SAST security test to CI/CD pipeline
LilianNwacukwu Nov 16, 2025
529f8cc
Resolve merge conflicts and update files
LilianNwacukwu Nov 16, 2025
5e1821d
Add ZAP DAST security test to frontend CI pipeline
LilianNwacukwu Nov 16, 2025
7ef63e3
Add ZAP DAST security test to frontend CI pipeline
LilianNwacukwu Nov 16, 2025
51fecd1
Add ZAP DAST security test to frontend CI pipeline
LilianNwacukwu Nov 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/lesson-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ on:
push:
branches:
- lesson-3-complete

jobs:
function_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- run: npm install
- name: Run functional tests
run: npm test -- --coverage --watchAll=false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
working-directory: frontend
- name: Run tests
run: npm test
working-directory: frontend

deploy:
needs: [function_test]
needs: function_test
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -27,4 +33,4 @@ jobs:
- name: Generate deployment package
run: zip -r deploy.zip build Dockerfile
- name: '**PLACEHOLDER** Deploy to Elastic Beanstalk'
run: echo Placeholder for Deployment
run: echo Placeholder for Deployment
24 changes: 22 additions & 2 deletions .github/workflows/lesson-5-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@ on:
push:
branches:
- lesson-5

jobs:
security_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
name: Execute the PyCharm security test
steps:
- uses: actions/checkout@v4
- name: disable debug
run: |
sed -i 's/DEBUG = True/DEBUG = False/g' hangry_api/hangry_api/settings.py
- name: Run PyCharm Security
uses: tonybaloney/pycharm-security@1.9.0

build_and_test:
needs: security_test
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -24,15 +40,19 @@ jobs:
run: |
coverage run -m --source=./hangry_api pytest
coverage report

deploy:
needs: [build_and_test]
needs: build_and_test
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Disable Debug
run: |
sed -i 's/DEBUG = True/DEBUG = False/g' hangry_api/hangry_api/settings.py
- name: Generate deployment package
run: zip -r deploy.zip . -x '*.git*'
- name: '**PLACEHOLDER** Deploy to Elastic Beanstalk'
run: echo Placeholder for Deployment
run: echo Placeholder for Deployment
10 changes: 9 additions & 1 deletion .github/workflows/lesson-5-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lesson 5 DAST
on:
push:
branches:
- lesson-5
- lesson-5-complete
jobs:
function_test:
runs-on: ubuntu-latest
Expand All @@ -28,3 +28,11 @@ jobs:
run: zip -r deploy.zip build Dockerfile
- name: '**PLACEHOLDER** Deploy to Elastic Beanstalk'
run: echo Placeholder for Deployment
security_test:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Dynamic Application Security Scan
uses: zaproxy/action-baseline@v0.7.0
with:
target: 'http://hangry-web-dev.us-east-1.elasticbeanstalk.com/'
5 changes: 4 additions & 1 deletion .github/workflows/lesson-6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- lesson-6

jobs:
function_test:
runs-on: ubuntu-latest
Expand All @@ -15,6 +16,7 @@ jobs:
- run: npm install
- name: Run functional tests
run: npm test -- --coverage --watchAll=false

deploy:
needs: [function_test]
runs-on: ubuntu-latest
Expand All @@ -28,11 +30,12 @@ jobs:
run: zip -r deploy.zip build Dockerfile
- name: '**PLACEHOLDER** Deploy to Elastic Beanstalk'
run: echo Placeholder for Deployment

security_test:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Dynamic Application Security Scan
uses: zaproxy/action-baseline@v0.7.0
with:
target: 'http://hangryhippo.quantic.host/'
target: 'https://hangryhippo.quantic.host/'
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ The front end was originally created using [Create React App](https://create-rea

3. As a result, you should see something like

================= test session starts ===================
test session starts
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: ./quantic-test-course/backend/hangry_api
collected 5 items

tests/test_DeliveryCost.py ... [ 50%]
tests/test_SubtotalCost.py .. [ 83%]
tests/test_Tax.py ........... [100%]
================= 5 passed in 0.16s =====================
5 passed in 0.16s

4. [Optional] Generate a coverage report (note that you must have run the unit tests at least once for this to work):

Expand Down Expand Up @@ -203,7 +203,11 @@ The front end was originally created using [Create React App](https://create-rea

5. [Optional] To use the local back-end APIs, make sure both servers (front-end and back-end) are running. Then, update ./frontend/src/utils/constants.js by replacing this line:

HEAD
export const API_URL = 'https://hangryhippo-api.quantic.host';

export const API_URL = 'http://hangryhippo-api.quantic.host';
origin/main

with this line:

Expand Down Expand Up @@ -233,7 +237,6 @@ The front end was originally created using [Create React App](https://create-rea

2. Verify that the tests were run. You should see something like

==============================================
(Run Starting)
┌─────────────────────────────────────────────┐
│ Cypress: 10.3.0 │
Expand Down Expand Up @@ -279,7 +282,7 @@ The front end was originally created using [Create React App](https://create-rea
- Finished processing: /quantic-test-course/frontend/cypress/videos/spec.cy.js.mp4 (2 seconds)


===============================================


(Run Finished)

Expand Down
Loading