Skip to content

Merge pull request #48 from shaunkirthan/main #113

Merge pull request #48 from shaunkirthan/main

Merge pull request #48 from shaunkirthan/main #113

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"