Update setup.py #37
Workflow file for this run
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: Run Tests and Deploy | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install tox, pytest, and dependencies | |
run: | | |
pip install tox | |
pip install pytest | |
pip install -r requirements.txt | |
# Install any other necessary dependencies | |
# pip install package_name | |
- name: Run black style check | |
run: | | |
pip install black==23.7.0 | |
python3 -m black --preview --check BugsInPy/ diff_utils/ | |
- name: Run tests | |
run: tox | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install build twine | |
- name: Build package | |
run: | | |
python -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: dist |