Skip to content

Commit

Permalink
CI: get things somewhat working again
Browse files Browse the repository at this point in the history
and drop mypy and py2 for now
  • Loading branch information
lazka committed Nov 26, 2024
1 parent 06cb294 commit 48dadce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 60 deletions.
63 changes: 5 additions & 58 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.5, 3.6, 3.7, 3.8, pypy3]
os: [ubuntu-20.04, macos-13, windows-2019]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -21,7 +22,7 @@ jobs:
python -m pip install --upgrade pip
pip install pytest hypothesis flake8 coverage
- name: Run tests on Unix
if: ${{ matrix.os != 'windows-latest' }}
if: ${{ matrix.os != 'windows-2019' }}
run: |
LANG=C LC_ALL=C python -c "import sys; print(sys.getfilesystemencoding())";
LANG=C LC_ALL=C python -m coverage run --branch setup.py test
Expand All @@ -31,7 +32,7 @@ jobs:
python -m coverage xml -i
- name: Run tests on Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2019' }}
run: |
python -m coverage run --branch setup.py test
python -m coverage xml -i
Expand All @@ -40,57 +41,3 @@ jobs:
python -m flake8
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5

test-mypy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.8]
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 mypy
- name: Run mypy
run: |
python -m mypy .
test-py2:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [2.7]
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 pytest hypothesis coverage typing
- name: Run tests on Unix
if: ${{ matrix.os != 'windows-latest' }}
run: |
LANG=C LC_ALL=C python -c "import sys; print(sys.getfilesystemencoding())";
LANG=C LC_ALL=C python -m coverage run --branch setup.py test
LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 python -c "import sys; print(sys.getfilesystemencoding())";
LANG=C LC_ALL=C python -m coverage run --append --branch setup.py test
python -m coverage xml -i
- name: Run tests on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
python -m coverage run --branch setup.py test
python -m coverage xml -i
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run(self):

for key in list(sys.modules.keys()):
if key.startswith('senf'):
del(sys.modules[key])
del sys.modules[key]

cov = coverage()
cov.start()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hypo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import os
import platform
from typing import Text, List
from typing import Text, List # noqa

import pytest
from hypothesis import given, strategies, settings, HealthCheck
Expand Down

0 comments on commit 48dadce

Please sign in to comment.