py312 #55
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 package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
# python-version: ['3.7.17', '3.8.18', '3.9.19', '3.10.14', '3.11.9', '3.12.3'] | |
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 build pytest wheel | |
if [ "${{ matrix.python-version }}" = "3.12" ]; then pip install distutils; fi | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Test with pytest | |
run: pytest test.py | |
# publish: | |
# runs-on: ubuntu-latest | |
# needs: test_and_tag | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Pull Again | |
# run: | | |
# sleep 2 | |
# git pull | |
# - name: Set up Python 3.10 | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: "3.10" | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install build pytest wheel python-semantic-release | |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# - name: Build artifacts | |
# run: python -m build | |
# env: | |
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
# - name: Publish package to TestPyPI | |
# run: python3 -m twine upload --verbose --password $TWINE_PASSWORD dist/* | |
# env: | |
# TWINE_USERNAME: __token__ | |
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
# TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/ |