brandon722 / tdd

CS472 - Test Driven Development Lab
MIT License
0 stars 0 forks source link

Review Existing Workflow #1

Closed brandon722 closed 2 weeks ago

brandon722 commented 2 weeks ago

We previously had to write a workflow file for github. It runs on ubuntu-latest and uses Python 3.9. We had to add steps to lint the code with flake8 and run tests with pytest.

I have asked ChatGPT for improvements: https://chatgpt.com/share/6705d724-8a00-800e-b6b3-10355c750c31

brandon722 commented 2 weeks ago

It has made these changes:

Matrix: Added matrix strategy to test on multiple Python versions (3.8, 3.9, 3.10) and operating systems (Ubuntu and Windows). SonarQube Scan: Added steps to integrate SonarQube for code analysis. Trivy Security Scan: Added a step to perform security scanning of the Python image using Trivy. Bandit Security Analysis: Static security analysis for Python code using Bandit. Code Coverage: Extended pytest step to generate and upload coverage reports using Coveralls.

brandon722 commented 2 weeks ago

Error: Invalid workflow file

The workflow is not valid. .github/workflows/workflow.yml (Line: 30, Col: 9): Unexpected value 'else'

Fixed to only use "ifs"

brandon722 commented 2 weeks ago

Removed check for python 3.10 and am using 3.8 and 3.9 only now.

brandon722 commented 2 weeks ago

Workflow run successful. Here is the updated ChatGPT link:

https://chatgpt.com/share/6705d724-8a00-800e-b6b3-10355c750c31