fix in docs #91
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: upload_on_tag | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| test: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.11] # Ajustado a la versión que usas | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| poetry install | |
| - name: Run tests | |
| run: | | |
| poetry run pytest tests/ --ignore tests/integration/test_wandb_optimizer.py --cov=framework3 --cov-report=xml | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v3 | |
| build-and-publish: | |
| needs: test | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry poetry-dynamic-versioning | |
| - name: Build package | |
| run: | | |
| poetry dynamic-versioning | |
| poetry build | |
| - name: Publish to PyPI | |
| env: | |
| PYPI_USERNAME: __token__ | |
| PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| run: | | |
| poetry config pypi-token.pypi $PYPI_PASSWORD | |
| poetry publish |