Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/build-ultraplot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
python-version:
required: true
type: string
locale:
required: true
type: string

jobs:
build-ultraplot:
Expand Down Expand Up @@ -53,23 +56,28 @@ jobs:
- name: Generate baseline from main
shell: bash -el {0}
run: |
cd $GITHUB_WORKSPACE
mkdir -p baseline
micromamba activate ultraplot-dev
git fetch origin ${{ github.event.pull_request.base.sha }}
git checkout ${{ github.event.pull_request.base.sha }}
pytest --mpl-generate-path=baseline_images
python -c "import ultraplot as plt; plt.config.Configurator()._save_yaml('ultraplot.yml')"
pytest --mpl-generate-path=baseline --mpl-default-style="./ultraplot.yml"
git checkout ${{ github.sha }} # Return to PR branch

- name: Image Comparison Ultraplot
shell: bash -el {0}
run: |
cd $GITHUB_WORKSPACE
micromamba activate ultraplot-dev
pytest --mpl-generate-path=baseline_images --mpl-default-style $(python -c "import ultraplot as plt; print(plt.config.Configurator())")
mkdir -p results
python -c "import ultraplot as plt; plt.config.Configurator()._save_yaml('ultraplot.yml')"
pytest --mpl --mpl-baseline-path=baseline --mpl-generate-summary=html --mpl-results-path=./results/ --mpl-default-style="./ultraplot.yml"

# return the images that failed
# Return the html output of the comparison even if failed
- name: Upload comparison failures
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: failed-comparisons
path: result_images
name: failed-comparisons-${{ inputs.python-version }}-${{ inputs.locale }}
path: results/*
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ jobs:
uses: ./.github/workflows/build-ultraplot.yml
with:
python-version: ${{ matrix.python-version }}
locale: ${{ matrix.locale }}