-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e854aad
commit 831438e
Showing
19 changed files
with
364 additions
and
509 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['pypy-3.9', 3.9, '3.10', 'pypy-3.10', '3.11', '3.12', '3.13'] | ||
cython: ['yes', 'no'] | ||
include: | ||
- os: ubuntu-latest | ||
path: ~/.cache/pip | ||
- os: macos-latest | ||
path: ~/Library/Caches/pip | ||
- os: windows-latest | ||
path: ~\AppData\Local\pip\Cache | ||
exclude: | ||
- os: macos-latest | ||
python-version: 'pypy-3.9' | ||
- os: macos-latest | ||
python-version: 'pypy-3.10' | ||
- os: windows-latest | ||
python-version: 'pypy-3.9' | ||
- os: windows-latest | ||
python-version: 'pypy-3.10' | ||
# - os: windows-latest | ||
# cython: 'yes' | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
PYTHONIOENCODING: UTF-8 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Install | ||
id: restore-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ matrix.path }} | ||
poetry.lock | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tests/requirements.txt') }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: '1.8.3' | ||
virtualenvs-create: false | ||
|
||
- name: Install | ||
run: poetry install | ||
|
||
- name: Build Cython file | ||
if: ${{ matrix.cython == 'yes' }} | ||
run: make cythonize | ||
|
||
- name: Style | ||
if: ${{ ! startsWith(matrix.python-version, 'pypy-') && startsWith(matrix.os, 'ubuntu') }} | ||
run: make check | ||
|
||
- name: Tests | ||
run: make test | ||
|
||
- uses: codecov/codecov-action@v4 | ||
with: | ||
file: coverage.xml | ||
name: coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cython }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true |
Oops, something went wrong.