Skip to content

Update repo to use latest template, black formatting #3

Update repo to use latest template, black formatting

Update repo to use latest template, black formatting #3

Workflow file for this run

name: Run all tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 5 * * 0' # once every Sunday at midnight ET
workflow_dispatch:
jobs:
run-all-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: linux-python3.9-minimum , requirements: minimum , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.9 , requirements: upgraded , python-ver: "3.9" , os: ubuntu-latest }
- { name: linux-python3.10 , requirements: upgraded , python-ver: "3.10", os: ubuntu-latest }
- { name: linux-python3.11 , requirements: upgraded , python-ver: "3.11", os: ubuntu-latest }
- { name: linux-python3.12 , requirements: upgraded , python-ver: "3.12", os: ubuntu-latest }
- { name: linux-python3.13 , requirements: upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: windows-python3.9-minimum , requirements: minimum , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.9 , requirements: upgraded , python-ver: "3.9" , os: windows-latest }
- { name: windows-python3.10 , requirements: upgraded , python-ver: "3.10", os: windows-latest }
- { name: windows-python3.11 , requirements: upgraded , python-ver: "3.11", os: windows-latest }
- { name: windows-python3.12 , requirements: upgraded , python-ver: "3.12", os: windows-latest }
- { name: windows-python3.13 , requirements: upgraded , python-ver: "3.13", os: windows-latest }
- { name: macos-python3.9-minimum , requirements: minimum , python-ver: "3.9" , os: macos-latest }
- { name: macos-python3.9 , requirements: upgraded , python-ver: "3.9" , os: macos-latest }
- { name: macos-python3.10 , requirements: upgraded , python-ver: "3.10", os: macos-latest }
- { name: macos-python3.11 , requirements: upgraded , python-ver: "3.11", os: macos-latest }
- { name: macos-python3.12 , requirements: upgraded , python-ver: "3.12", os: macos-latest }
- { name: macos-python3.13 , requirements: upgraded , python-ver: "3.13", os: macos-latest }
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required to determine the version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-ver }}
- name: Install run requirements (minimum)
if: ${{ matrix.requirements == 'minimum' }}
run: |
python -m pip install --upgrade pip
python -m pip install ".[min-reqs,test]"
python -m pip list
python -m pip check
- name: Install run requirements (upgraded)
if: ${{ matrix.requirements == 'upgraded' }}
run: |
python -m pip install --upgrade pip
# force upgrade of all dependencies to latest versions within allowed range
python -m pip install -U ".[test]"
python -m pip list
python -m pip check
- name: Run tests
run: |
pytest -v
- name: Build wheel and source distribution
run: |
python -m pip install --upgrade build
python -m build
ls -1 dist
- name: Test installation from a wheel (POSIX)
if: ${{ matrix.os != 'windows-latest' }}
run: |
python -m venv test-wheel-env
source test-wheel-env/bin/activate
python -m pip install dist/*-none-any.whl
python -c "import ndx_franklab_novela"
- name: Test installation from a wheel (windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
python -m venv test-wheel-env
call test-wheel-env/Scripts/activate.bat
python -m pip install dist/*-none-any.whl
python -c "import ndx_franklab_novela"