feat: add Battle.net username validator #14
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 (pytest + coverage) | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test (pytest + coverage) — ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Show Python info | |
| run: | | |
| python --version | |
| which python | |
| python -m pip --version | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install package & test deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install pytest pytest-cov | |
| - name: Show installed packages | |
| run: pip freeze | sed -n '1,200p' | |
| - name: Run pytest with coverage | |
| run: | | |
| mkdir -p test-output | |
| pytest -vv --maxfail=1 --disable-warnings \ | |
| --junitxml=test-output/report.xml \ | |
| --cov=user_scanner \ | |
| --cov-report=xml:test-output/coverage.xml \ | |
| --cov-report=term | |
| - name: Upload test artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.python-version }} | |
| path: test-output |