fix posterior reference draws download #3
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: Python | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [closed] | |
| paths-ignore: | |
| - 'README.md' | |
| jobs: | |
| models: | |
| name: Run Tests and Publish | |
| runs-on: ${{ matrix.os }} | |
| if: ${{ github.event.pull_request.merged }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: [3.6, 3.7, 3.8, 3.9] | |
| fail-fast: false | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout python module repo | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout posteriordb repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: stan-dev/posteriordb | |
| path: posteriordb | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install python dependencies | |
| run: | | |
| pip install --upgrade pip wheel | |
| pip install tox-gh-actions codecov | |
| - name: Tox | |
| run: | | |
| cd python | |
| tox | |
| #codecov | |
| - name: Build wheel | |
| run: | | |
| cd python | |
| python setup.py bdist_wheel | |
| - name: Install wheel | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| python -m pip install python/dist/*.whl | |
| - name: Install wheel [Windows] | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| $whl = Get-ChildItem -Path python/dist -Filter *.whl | Select-Object -First 1 | |
| python -m pip install "$whl" | |
| - name: Show libraries | |
| run: | | |
| python -m pip freeze | |
| - uses: actions/upload-artifact@v2 | |
| if: success() && matrix.os == 'ubuntu-latest' | |
| with: | |
| name: posteriordb_wheel | |
| path: python/dist/*.whl | |
| - name: Upload wheel to release | |
| uses: svenstaro/upload-release-action@v1-release | |
| if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: python/dist/*.whl | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |
| - name: Upload to pypi | |
| if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' | |
| env: | |
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
| run: | | |
| python -m pip install --no-cache-dir twine | |
| python -m twine upload -u ${TWINE_USERNAME} -p ${TWINE_PASSWORD} --skip-existing python/dist/* |