fix: dask dependancie error #23
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: Publish Python Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release/*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release-test: | |
| if: startsWith(github.ref_name, 'release/') | |
| runs-on: ubuntu-latest | |
| environment: test-release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' # TROQUEI PRA 3.12 QUE É MAIS ESTÁVEL | |
| - name: Install Poetry | |
| uses: abatilo/actions-poetry@v3 | |
| with: | |
| poetry-version: 'latest' | |
| - name: Configure Poetry | |
| run: | | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: .venv | |
| key: venv-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --with dev --all-extras | |
| - name: Run tests | |
| run: poetry run pytest --cov=sumeh --cov-report=xml | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Create version | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: poetry run semantic-release version | |
| - name: Build package | |
| run: poetry build | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| release-prod: | |
| if: github.ref_name == 'main' | |
| runs-on: ubuntu-latest | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Poetry | |
| uses: abatilo/actions-poetry@v3 | |
| with: | |
| poetry-version: 'latest' | |
| - name: Configure Poetry | |
| run: | | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: .venv | |
| key: venv-${{ hashFiles('poetry.lock') }} | |
| - name: Install ALL dependencies | |
| run: poetry install --with dev --all-extras | |
| - name: Run tests | |
| run: poetry run pytest --cov=sumeh --cov-report=xml | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Create version | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: poetry run semantic-release version | |
| - name: Build package | |
| run: poetry build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |