Skip to content

Merge branch 'main' of ssh://github.com/explosion/confection into kab… #27

Merge branch 'main' of ssh://github.com/explosion/confection into kab…

Merge branch 'main' of ssh://github.com/explosion/confection into kab… #27

Workflow file for this run

name: tests
on:
push:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
tests:
name: Test
if: github.repository == 'explosion/confection'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
include:
- os: windows-2019
python_version: "3.6"
- os: ubuntu-20.04
python_version: "3.6"
runs-on: ${{ matrix.os }}
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Configure Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Build sdist
run: |
python -m pip install -U build pip setuptools
python -m pip install -U -r requirements.txt
python -m build --sdist
- name: Run mypy
run: python -m mypy confection
if: matrix.python_version != '3.6'
- name: Delete source directory
run: rm -rf confection
shell: bash
- name: Uninstall all packages
run: |
python -m pip freeze > installed.txt
python -m pip uninstall -y -r installed.txt
- name: Install from sdist
run: |
SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1)
python -m pip install dist/$SDIST
shell: bash
- name: Test import
run: python -c "import confection" -Werror
- name: Install test requirements
run: python -m pip install -U -r requirements.txt
- name: Run tests
run: python -m pytest --pyargs confection -Werror
- name: Test for import conflicts with hypothesis
run: |
python -m pip install hypothesis
python -c "import confection; import hypothesis"