Skip to content

Commit

Permalink
Support Python 3.12 (#58)
Browse files Browse the repository at this point in the history
* Update GitHub Actions
* Cancel existing GitHub Action runs when a new push happens
* Set minimum Python version as 3.8 in macOS (arm64)
    * 3.7 is not available for arm64
  • Loading branch information
appleparan authored May 22, 2024
1 parent d4c7ea2 commit 339a45c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,30 @@ on:
- cron: '34 2 * * *'
workflow_dispatch:

# Cancel existing runs when a new push happens
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: "3.7"
python-version: "3.8"
- os: macos-latest
python-version: "3.11"
python-version: "3.12"

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

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

Expand All @@ -41,7 +45,14 @@ jobs:
python -m pip install .
python -m pip --quiet install ipythonblocks matplotlib pytest
python -m pip list
#----------------------------------------------
# load pip cache if cache exists
#----------------------------------------------
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: ${{ runner.os }}-pip
- name: Run unit tests
run: |
pytest
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Visualization"
]

Expand Down

0 comments on commit 339a45c

Please sign in to comment.