Updated model.py and created test cases for CRUD operations #31
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: Run Tests On Push | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python 3.10.3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10.13 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install pytest pytest-cov | |
echo requirements installed | |
- name: Run tests | |
run: | | |
pytest tests/test_*.py --doctest-modules --junitxml=junit/test-results.xml --cov=tests --cov-report=xml --cov-report=html |