Skip to content

Commit b4c89fc

Browse files
authored
Merge pull request #10 from cadenmyers13/scrap
ex wf
2 parents 54b75fb + 380b722 commit b4c89fc

File tree

5 files changed

+80
-0
lines changed

5 files changed

+80
-0
lines changed

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ labels: "release"
66
assignees: ""
77
---
88

9+
### Run diffpy.cmi example scripts
10+
11+
- [ ] Manually trigger the `validate-examples.yml` workflow to run all example scripts.
12+
913
### PyPI/GitHub rc-release preparation checklist:
1014

1115
- [ ] All PRs/issues attached to the release are merged.

.github/workflows/tests-on-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
project: diffpy.cmi
1212
c_extension: false
1313
headless: false
14+
python_version: 3.13
1415
run: |
1516
set -Eeuo pipefail
1617
echo "Test cmds"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Validate Examples
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
validate-examples:
8+
defaults:
9+
run:
10+
shell: bash -l {0}
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Initialize miniconda
19+
uses: conda-incubator/setup-miniconda@v3
20+
with:
21+
activate-environment: test
22+
channels: conda-forge
23+
auto-update-conda: true
24+
auto-activate-base: false
25+
python-version: 3.13
26+
27+
- name: Conda config
28+
run: >-
29+
conda config --set always_yes yes
30+
--set changeps1 no
31+
32+
- name: Install dependencies
33+
run: |
34+
conda install --file requirements/conda.txt
35+
conda install --file requirements/tests.txt
36+
37+
if [ -d requirements/packs ]; then
38+
for f in requirements/packs/*.txt; do
39+
if [ -f "$f" ]; then
40+
echo "Installing dependencies from $f"
41+
conda install --file "$f"
42+
fi
43+
done
44+
fi
45+
46+
python -m pip install . --no-deps
47+
48+
- name: Run example scripts
49+
run: |
50+
set -Eeuo pipefail
51+
echo "Running example scripts"
52+
pytest validators/validate_examples.py --cov

news/run-ex-on-releases.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* Add workflow to run ``examples/validate_examples.py`` manually.
4+
5+
**Changed:**
6+
7+
* Changed workflow so that ``validate_examples.py`` is ran only on manual triggers.
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>
File renamed without changes.

0 commit comments

Comments
 (0)