Merge pull request #108 from C2Tech-sys/fix/checkout-none-params #72
This file contains hidden or 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
| # ============================================================================== | |
| # TODO (Maintainer Note): | |
| # To enable automated pytest & coverage checks on pushes/PRs to main: | |
| # 1. Move/rename this file to: .github/workflows/pytest.yml | |
| # 2. Commit and push to your main branch. | |
| # ============================================================================== | |
| name: Run Unit Tests | |
| on: | |
| # 1. Automatically run on pushes to main | |
| push: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - '**/**.md' # Optional: Ignores READMEs in subdirectories | |
| # 2. Automatically run on incoming Pull Requests targeting main | |
| pull_request: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - '**/**.md' # Optional: Ignores READMEs in subdirectories | |
| # 3. Allow manual execution on ANY branch via GitHub UI | |
| workflow_dispatch: | |
| jobs: | |
| pytest: | |
| name: Run Pytest Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install pytest pytest-cov requests | |
| - name: Execute Pytest Suite | |
| run: | | |
| python -m pytest test_price_browser.py test_price_checker.py test_alert_matrix.py test_per_account_notify.py -vs --cov=CheckRoyalCaribbeanPrice --cov=BrowseRoyalCaribbeanPrice --cov-report=term-missing |