Improve default behaviour of label_line_ends
#249
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
# This workflow should install niceplots and dependencies the check formatting with flake8 and black and then check the the examples run without error | |
name: niceplots | |
on: | |
push: | |
branches: [main] | |
tags: | |
- v*.*.* | |
pull_request: | |
jobs: | |
black: | |
uses: mdolab/.github/.github/workflows/black.yaml@main | |
flake8: | |
uses: mdolab/.github/.github/workflows/flake8.yaml@main | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
numpy-version: ["1.19.*", "1.21.*", "1.24.*"] | |
mpl-version: ["3.4.*", "3.6.*"] | |
exclude: | |
- python-version: "3.9" | |
numpy-version: "1.19.*" | |
- python-version: "3.10" | |
numpy-version: "1.19.*" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install apt dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: fonts-cmu nodejs npm | |
version: 1.0 | |
- name: Install node dependencies | |
run: | | |
sudo npm install -g odiff-bin | |
- name: Install Prompt font | |
run: | | |
mkdir Prompt | |
cd Prompt | |
wget "https://fonts.google.com/download?family=Prompt" -O Prompt.zip | |
unzip Prompt.zip | |
mkdir ~/.fonts | |
cp *.ttf ~/.fonts | |
- name: Install python dependencies | |
run: | | |
pip install --upgrade pip wheel | |
pip install numpy==${{ matrix.numpy-version }} | |
pip install matplotlib==${{ matrix.mpl-version }} | |
pip install . | |
- name: Test examples | |
run: | | |
cd examples | |
bash testExamples.sh | |
- name: Compare against reference images | |
if: ${{ success() && matrix.python-version == '3.10' && matrix.numpy-version == '1.24.*' && matrix.mpl-version == '3.6.*' }} | |
run: | | |
cd examples | |
bash ImageComparisonTest.sh | |
- name: Upload examples if failed | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() && matrix.python-version == '3.10' && matrix.numpy-version == '1.24.*' && matrix.mpl-version == '3.6.*' }} | |
with: | |
name: Examples | |
path: examples/ | |
# - name: Upload new reference images | |
# if: ${{ github.event_name == 'push' && success() && matrix.python-version == '3.10' && matrix.numpy-version == '1.24.*' && matrix.mpl-version == '3.6.*' }} | |
# uses: stefanzweifel/git-auto-commit-action@v4 | |
# with: | |
# file_pattern: 'examples/ref/*.png' | |
# commit_message: Update reference images | |
# --- publish to PyPI | |
pypi: | |
needs: [test, flake8, black] | |
uses: mdolab/.github/.github/workflows/pypi.yaml@main | |
secrets: inherit |