Requiring final scores when complete_only #826
This file contains 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: PyPI | |
on: push | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" # See 'Supported distributions' for available options | |
java-version: "15" | |
- name: "Install pep517 and twine" | |
run: "python -m pip install --upgrade pip setuptools wheel pytest twine" | |
- name: "Build package" | |
run: "python setup.py sdist bdist_wheel" | |
- name: "Check long_description" | |
run: "python -m twine check dist/*" | |
- name: Publish distribution 📦 to Test PyPI | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypitesttoken }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: "Run all tests" | |
run: | | |
set -xe | |
ulimit -n 50000 | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip setuptools wheel pytest | |
python -m pip install --upgrade virtualenv | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
python -m ipykernel install --user --name=negmas | |
python -m pip install -e . | |
# negmas genius-setup | |
# export NEGMAS_IGNORE_TEST_NOTEBOOKS=False; python -W ignore -m pytest negmas tests | |
- name: Publish distribution 📦 to PyPI | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypiapitoken }} |