one more try #13
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 | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U coveralls twine wheel | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
coverage run --branch pedantic/tests/tests_main.py | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2.2.3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: .coverage | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' # only on master | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 # Specify the Python version you want to use for deployment | |
- name: Build and Upload to PyPI | |
run: | | |
pwd | |
ls -la | |
python setup.py bdist_wheel | |
twine upload dist/*.whl # Uploads the wheel file to PyPI |