Ensure GovernExclusion
and ConfigureGUI
work together
#145
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
schedule: | |
# run every Sunday at 10:13 am UTC (3:13 am PT) | |
- cron: '13 10 * * 0' | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
# base-tests: | |
# name: py${{ matrix.python }} ${{ matrix.name-modifier }} - on ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# # mark default | |
# - python: '3.10' | |
# os: ubuntu-latest | |
# do-coverage: false | |
# name-modifier: '' | |
# | |
# # mark case for coverage reporting | |
# - python: '3.7' | |
# os: ubuntu-latest | |
# do-coverage: true | |
# name-modifier: 'with Coverage' | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python }} | |
# - name: Install 'bapsflib' dependencies | |
# run: python -m pip install -r requirements/tests.txt | |
# - name: Run tests ${{ matrix.name-modifier }} | |
# run: | | |
# if ${{ matrix.do-coverage }}; then | |
# coverage run -m unittest discover | |
# else | |
# python -m unittest discover | |
# fi | |
# shell: bash | |
# - name: Report coverage | |
# if: ${{ matrix.do-coverage && !failure() }} | |
# uses: codecov/codecov-action@v3.1.4 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# files: .coverage | |
# fail_ci_if_error: true | |
# | |
# tests: | |
# needs: base-tests | |
# name: py${{ matrix.python }} - on ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# python: ['3.7', '3.8', '3.9', '3.10'] | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
# | |
# exclude: | |
# # these were done in base-tests | |
# - python: '3.10' | |
# os: ubuntu-latest | |
# - python: '3.7' | |
# os: ubuntu-latest | |
# | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python }} | |
# - name: Install 'bapsflib' dependencies | |
# run: python -m pip install -r requirements/tests.txt | |
# - name: Run tests | |
# run: | | |
# python -m unittest discover | |
# shell: bash | |
# | |
# test-mins: | |
# # test min versions of key dependencies | |
# needs: tests | |
# name: Min Vers | py-${{ matrix.python }} | ${{ matrix.spec-name }} | |
# runs-on: ubuntu-latest | |
# | |
# strategy: | |
# fail-fast: true | |
# matrix: | |
# include: | |
# - spec-name: h5py v3.0 | |
# min-install: h5py==3.0 | |
# python: '3.7' | |
# | |
# - spec-name: h5py v3.0 numpy v1.20 | |
# min-install: h5py==3.0 numpy==1.20 | |
# python: '3.7' | |
# | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python }} | |
# - name: Install 'bapsflib' dependencies | |
# run: | | |
# python -m pip install -r requirements/tests.txt ${{ matrix.min-install }} | |
# - name: Run tests | |
# run: python -m unittest discover | |
import-bapsf_motion: | |
name: Importing bapsf_motion | |
# needs: base-tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: [ '3.10', '3.11', '3.12' ] | |
os: [ubuntu-latest] | |
architecture: [x64] | |
include: | |
- python: '3.7' | |
os: windows-2019 | |
architecture: x64 | |
- python: '3.10' | |
os: windows-2019 | |
architecture: x64 | |
- python: '3.10' | |
os: windows-2019 | |
architecture: x86 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: ${{ matrix.architecture }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install pip --upgrade | |
- name: Install 'bapsf_motion' dependencies | |
if: ${{ matrix.architecture == 'x64' }} | |
run: | | |
python -m pip install -r requirements/gui.txt | |
- name: Install additional PySide6 dependencies [Linux Systems ONLY] | |
if: ${{ matrix.architecture == 'x64' && runner.os != 'Windows'}} | |
run: | | |
sudo apt update && sudo apt install -y libegl1-mesa-dev | |
- name: Install 'bapsf_motion' dependencies (32bit) | |
if: ${{ matrix.architecture == 'x86' }} | |
run: | | |
python -m pip install -r requirements/install.txt | |
- name: Import 'bapsf_motion' | |
run: | | |
python -c 'import bapsf_motion' | |
- name: Import 'bapsf_motion.gui' | |
if: ${{ matrix.architecture == 'x64' }} | |
run: | | |
python -c 'import bapsf_motion.gui' | |
build-bapsf_motion: | |
name: Packaging | |
runs-on: ubuntu-latest | |
needs: | |
# - test-mins | |
- import-bapsf_motion | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get history and tags for SCM versioning to work | |
run: | | |
git fetch --prune --unshallow | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: pip | |
- name: Install requirements | |
run: | | |
pip install --progress-bar off --upgrade pip setuptools setuptools_scm twine build | |
pip install --progress-bar off -r requirements/install.txt | |
- name: Build a binary wheel | |
run: | | |
python -m build --wheel --outdir dist/ | |
- name: Build a source tarball | |
run: | | |
python -m build --sdist --outdir dist/ | |
- name: Twine check | |
run: | | |
twine check dist/* | |
- name: Install bapsf_motion in all variants | |
run: | | |
pip install --progress-bar off .[install] | |
pip install --progress-bar off -e .[install] |