Merge pull request #54 from HeyIts-RJ/rishabh/intro_to_kserve #129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing Github Lab1 with Pytest | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: pip install -r Labs/Github_Labs/Lab1/requirements.txt | |
- name: Run tests and generate XML report | |
run: pytest Labs/Github_Labs/Lab1/test/test_pytest.py --junitxml=pytest-report.xml | |
continue-on-error: false | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: pytest-report.xml | |
- name: Notify on success | |
if: success() | |
run: echo "Tests passed successfully" | |
- name: Notify on failure | |
if: failure() | |
run: echo "Tests failed" |