Skip to content

Commit

Permalink
Bump CI Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoodsend committed Dec 24, 2023
1 parent 2c9aff0 commit e60c9e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.6, 3.7, 3.8, '3.10']
python-version: [3.8, '3.10', 3.12]
architecture: ['x64']
include:
- os: macos-10.15
python-version: 3.9
- os: ubuntu-20.04
python-version: 3.6
architecture: 'x64'
- os: macos-11.0
python-version: 3.9
- os: macos-latest
python-version: 3.12
architecture: 'x64'
- name: Windows
os: windows-latest
python-version: 3.9
- os: windows-latest
python-version: 3.12
architecture: 'x64'

fail-fast: false
Expand All @@ -31,28 +30,17 @@ jobs:
steps:

- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: Cache pip cached wheels
uses: actions/cache@v3
env:
cache-name: ${{ matrix.os }}
with:
path: pip-cache
key: ${{ matrix.os }}
restore-keys: ${{ matrix.os }}

- name: Install
run: |
pip install --cache-dir=pip-cache wheel
pip install --cache-dir=pip-cache -e .[test]
pip install wheel toml setuptools
pip install -e .[test]
- name: Build
run: python setup.py build
Expand All @@ -61,8 +49,11 @@ jobs:

- name: Test
run: pytest
env:
FORCE_COLOR: 1

# Test PyInstaller.
- run: pip uninstall -y hirola && pip install .
- run: pip install pyinstaller
- working-directory: tests/PyInstaller_
run: pyinstaller frozen-pytest.spec
Expand Down
7 changes: 5 additions & 2 deletions tests/PyInstaller_/frozen-pytest.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None
import sys

from PyInstaller.utils.hooks import collect_entry_point

Expand All @@ -10,7 +10,10 @@ datas, hiddenimports = collect_entry_point("pytest11")
# Collect modules imported by the test suite but not hirola itself.
hiddenimports += ["statistics"]

if sys.version_info < (3, 8):
hiddenimports += ["py._path"]

a = Analysis(['frozen-pytest.py'], datas=datas, hiddenimports=hiddenimports)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data)
exe = EXE(pyz, a.scripts, [], exclude_binaries=True, name='frozen-pytest')
coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, name='frozen-pytest')

0 comments on commit e60c9e5

Please sign in to comment.