Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 0 additions & 162 deletions .appveyor/appveyor-bootstrap.py

This file was deleted.

50 changes: 0 additions & 50 deletions .appveyor/appveyor-with-compiler.cmd

This file was deleted.

161 changes: 161 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: CI

on:
push:
branches:
- master
- main
tags:
- 'v*'
pull_request:


jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: '3.9'
- os: macos-latest
python-version: '3.9'
- os: windows-latest
python-version: '3.9'
- os: ubuntu-latest
python-version: '3.10'
- os: macos-latest
python-version: '3.10'
- os: windows-latest
python-version: '3.10'
- os: ubuntu-latest
python-version: '3.11'
- os: macos-latest
python-version: '3.11'
- os: windows-latest
python-version: '3.11'
- os: ubuntu-latest
python-version: '3.12'
- os: macos-latest
python-version: '3.12'
- os: windows-latest
python-version: '3.12'
- os: ubuntu-latest
python-version: '3.13'
- os: macos-latest
python-version: '3.13'
- os: windows-latest
python-version: '3.13'
- os: ubuntu-latest
python-version: '3.14'
- os: macos-latest
python-version: '3.14'
- os: windows-latest
python-version: '3.14'
- os: ubuntu-latest
python-version: 'pypy-3.10'

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
setup.py
tox.ini

- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel

- name: Install package
run: |
python -m pip install .

- name: Run tests
run: |
python -m unittest discover -s test -p 'test_*.py'

test-py27:
name: Python 2.7 on Ubuntu
runs-on: ubuntu-latest
container:
image: python:2.7.18-buster

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Build extension in place
run: |
python setup.py build_ext --inplace

- name: Run tests
run: |
python -m unittest discover -s test -p 'test_*.py'

build:
name: Build distributions
runs-on: ubuntu-latest
needs: [ test, test-py27 ]
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
setup.py
tox.ini

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade pip build
python -m build

- name: Smoke test built artifacts
run: |
python -m venv .venv-smoke
. .venv-smoke/bin/activate
python -m pip install --upgrade pip
python -m pip install dist/*.whl
python -m unittest discover -s test -p 'test_*.py'

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
permissions:
id-token: write

steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ MANIFEST
*.so
*.swp
venv/
.venv/
.venv/
.python-version
Loading
Loading