Skip to content

feat: compatibility with mplhep #291

feat: compatibility with mplhep

feat: compatibility with mplhep #291

# This workflow will install Python dependencies, run tests with a variety of Python versions
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flit pytest pre-commit
flit install
- name: Copy documentation
run: |
cp -r docs $LD_LIBRARY_PATH/python${{ matrix.python-version }}/site-packages/plothist/docs
- name: Run pre-commit
if: matrix.python-version != '3.7'
run: |
pre-commit run --all-files
- name: Test with pytest
run: |
pytest