forked from Ultraplot/UltraPlot
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.67 KB
/
build-ultraplot.yml
File metadata and controls
60 lines (54 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and Test
on:
workflow_call:
inputs:
python-version:
required: true
type: string
jobs:
build-ultraplot:
name: Test Python ${{ inputs.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v2.0.3
with:
environment-file: ./environment-dev.yml
init-shell: bash
create-args: >-
--verbose
python=${{ inputs.python-version }}
cache-environment: true
cache-downloads: false
- name: Build Ultraplot
shell: bash -el {0}
run: |
micromamba activate ultraplot-dev
pip install .
- name: Generate baseline from main
shell: bash -el {0}
run: |
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
git checkout ${{ github.sha }} # Return to PR branch
- name: Test Ultraplot
shell: bash -el {0}
run: |
micromamba activate ultraplot-dev
pytest
# - name: Image Comparison Ultraplot
# shell: bash -el {0}
# run: |
# micromamba activate ultraplot-dev
# pytest --mpl --mpl-baseline-path=baseline_images
# # return the images that failed
# - name: Upload comparison failures
# if: failure()
# uses: actions/upload-artifact@v4
# with:
# name: failed-comparisons
# path: result_images