GitHub actions workflow is created #2
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: Python Tests and Wheel | ||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
test-and-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
- name: Install libncurses.so.5 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libncurses5 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Python Tests | ||
run: | | ||
pytest tellurium/tests | ||
continue-on-error: true | ||
- name: Build Wheel if Tests Pass | ||
if: success() | ||
run: | | ||
python setup.py bdist_wheel | ||
continue-on-error: true | ||
- name: Upload to PyPI | ||
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/develop' && github.event.before != '0000000000000000000000000000000000000000' && paths('tellurium/Versions.txt') | ||
Check failure on line 46 in .github/workflows/main.yml GitHub Actions / Python Tests and WheelInvalid workflow file
|
||
run: | | ||
python -m pip install --upgrade pip | ||
pip install twine | ||
twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |