Skip to content

Commit c379a11

Browse files
committed
CI: add ci for testing the pdf pack
1 parent 856596e commit c379a11

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/test-pdf-pack.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test PDF Pack Scripts
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
test-conda:
11+
name: conda-${{ matrix.python-version }}-${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: [3.11, 3.12, 3.13] # requires manual update
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up conda
21+
uses: conda-incubator/setup-miniconda@v3
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
channels: conda-forge
25+
- name: Install diffpy.cmi
26+
run: |
27+
conda install -y diffpy.cmi
28+
- name: Run diffpy.cmi scripts from docs/examples
29+
shell: bash
30+
run: |
31+
set -e
32+
export MPLBACKEND=Agg
33+
for script in docs/examples/ch*/solutions/diffpy-cmi/*.py; do
34+
python "$script"
35+
done
36+
37+
test-pip:
38+
name: pip-${{ matrix.python-version }}-${{ matrix.os }}
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
os: [ubuntu-latest, macos-latest, windows-latest]
44+
python-version: [3.11, 3.12, 3.13] # requires manual update
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
- name: Install diffpy.cmi (pip)
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install diffpy.cmi
54+
- name: Run diffpy.cmi scripts from docs/examples
55+
shell: bash
56+
run: |
57+
set -e
58+
export MPLBACKEND=Agg
59+
for script in docs/examples/ch*/solutions/diffpy-cmi/*.py; do
60+
python "$script"
61+
done

0 commit comments

Comments
 (0)