Skip to content

Correct for enum module changes in Python>=3.11 #50

Correct for enum module changes in Python>=3.11

Correct for enum module changes in Python>=3.11 #50

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test from sdist and wheels
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build dists
run: python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: 'dists'
path: 'dist/*'
test:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: 'dists'
path: dist
- name: Install wheel
run: pip install dist/*.whl
- name: Test built wheel
run: py.test -o testpaths=tests
- name: Install sdist
run: |
pip uninstall -y tslumd
pip install dist/*.tar.gz
- name: Test built sdist
run: py.test -o testpaths=tests
deploy:
needs: test
if: ${{ success() && github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: 'dists'
path: dist
- name: Publish to PyPI
env:
TWINE_REPOSITORY_URL: ${{ secrets.TWINE_REPOSITORY_URL }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*