flake8 #211
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: pytest | |
on: push | |
jobs: | |
integrity_check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: setup.cfg | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[testing,examples] pytest-xdist | |
- name: Run flake8 | |
run: | | |
pip install --upgrade flake8 flake8-bugbear | |
flake8 . | |
- name: Run black | |
run: | | |
pip install --upgrade black | |
black --check --diff --color . | |
- name: Run isort | |
run: | | |
pip install --upgrade isort colorama | |
isort --check-only --diff --color . | |
- name: Link OpenMP on MacOS | |
run: | | |
if [ "$RUNNER_OS" == "macOS" ]; then | |
# Fix libiomp.dylib, as found in STUMPY: https://github.com/TDAmeritrade/stumpy | |
echo "Installing OpenMP" | |
brew install libomp | |
echo "Linking OpenMP" | |
brew link --force libomp | |
echo "Find OpenMP Linking Location" | |
libfile=`brew list libomp --verbose | grep libomp.dylib` | |
echo $libfile | |
echo "Changing @rpath for the omppool.cpython-x-darwin.so shared object to look in $libfile" | |
ls "$(python -c 'import site; print(site.getsitepackages()[0])')"/numba/np/ufunc/omppool.*.so | xargs install_name_tool -change @rpath/libomp.dylib $libfile | |
fi | |
shell: bash | |
- name: Numba environment report | |
run: python -m numba -s | |
- name: Pytest | |
run: pytest -n auto | |