Skip to content

Commit 9299d84

Browse files
committed
fixing ci/cd pipeline testing to unittest
1 parent abe9700 commit 9299d84

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/ci-cd-pipeline.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,20 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: '3.11' # Change to your project's Python version
24+
python-version: '3.11' # Change this to match your Python version
2525

2626
- name: Install Dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install -r requirements.txt # Ensure you have a requirements file
29+
pip install -r requirements.txt # Ensure you have dependencies listed
3030
31-
- name: Run Tests
31+
- name: Run Unit Tests with unittest
3232
run: |
33-
pytest tests/ --junitxml=report.xml # Use appropriate test framework
34-
35-
- name: Upload Test Results
33+
python -m unittest discover -s tests -p "*.py"
34+
35+
- name: Upload Test Results (if needed)
3636
if: always()
3737
uses: actions/upload-artifact@v4
3838
with:
3939
name: test-results
40-
path: report.xml
41-
42-
deploy:
43-
needs: build-and-test
44-
runs-on: ubuntu-latest
45-
if: github.ref == 'refs/heads/master' # Deploy only from main branch
46-
47-
steps:
48-
- name: Checkout Repository
49-
uses: actions/checkout@v4
50-
51-
- name: Deploy Application
52-
run: |
53-
echo "Deploying application..."
54-
# Add your deployment commands here, e.g., uploading files, running scripts
40+
path: tests/

0 commit comments

Comments
 (0)