Fix CI: exclude test_auth_e2e.py (requires playwright) #71
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
| name: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup sellerinfo | |
| run: cp sellerinfo_faked.py sellerinfo.py | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache uv | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('requirements.txt', 'requirements-test.txt') }} | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: uv pip install --system -r requirements.txt -r requirements-test.txt | |
| - name: Ruff | |
| run: ruff check . | |
| - name: Run main server tests (excluding inference) | |
| run: pytest --cov=questions --cov-report=xml -q -m "not inference" | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-xml | |
| path: coverage.xml | |
| offline-integration: | |
| runs-on: ubuntu-latest | |
| needs: unit | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup sellerinfo | |
| run: cp sellerinfo_faked.py sellerinfo.py | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache uv | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('requirements.txt', 'requirements-test.txt') }} | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: uv pip install --system -r requirements.txt -r requirements-test.txt | |
| - name: Download NLTK data | |
| run: python -m nltk.downloader punkt | |
| - name: Run offline integration tests (excluding inference) | |
| run: pytest -m "integration and not internet and not inference" -q | |
| integration: | |
| runs-on: ubuntu-latest | |
| needs: offline-integration | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup sellerinfo | |
| run: cp sellerinfo_faked.py sellerinfo.py | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache uv | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('requirements.txt', 'requirements-test.txt') }} | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: uv pip install --system -r requirements.txt -r requirements-test.txt | |
| - name: Download NLTK data | |
| run: python -m nltk.downloader punkt | |
| - name: Run integration tests (excluding inference) | |
| run: pytest -m "integration and internet and not inference" -q |