feat: modular architecture refactoring with 95% test coverage #7
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [main, 001-modular-refactor] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install -r requirements.txt | |
| - name: Run linter | |
| run: | | |
| ruff check src/github_analyzer/ | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -v --tb=short | |
| - name: Run tests with coverage | |
| run: | | |
| pytest tests/ --cov=src/github_analyzer --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| test-stdlib-only: | |
| name: Test without requests (stdlib only) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install test dependencies only | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| - name: Run tests without requests | |
| run: | | |
| pytest tests/ -v --tb=short |