Update __init__.py - version 1.0.3 to version 1.0.4 #154
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 - XPhrase Generator | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-and-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] # suficiente e rápido | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Upgrade pip & install build tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Install package in editable mode (necessário para testes e CLI) | |
| run: | | |
| pip install -e . # <- ESSA LINHA É OBRIGATÓRIA | |
| - name: Run unit tests | |
| run: | | |
| python -m unittest discover tests/ -v | |
| - name: Test CLI directly (sem depender do entry-point) | |
| run: | | |
| echo "=== Versão ===" | |
| python -m xphrase.main --version | |
| echo "=== 8 palavras (padrão) ===" | |
| python -m xphrase.main | |
| echo "=== --count 5 a 10 ===" | |
| for n in 5 6 7 8 9 10; do | |
| echo "→ $n palavras:" | |
| python -m xphrase.main --count $n | |
| done | |
| echo "=== Faixa aleatória (5-12) ===" | |
| python -m xphrase.main --min 5 --max 12 | |
| echo "=== Modo interativo (smoke test) ===" | |
| timeout 3s python -m xphrase.main --interactive || true # só pra garantir que inicia | |
| - name: Build package (wheel + sdist) | |
| run: | | |
| python -m build | |
| - name: Upload artifacts (opcional – útil pra ver o pacote gerado) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-python-${{ matrix.python-version }} | |
| path: dist/ |