Skip to content

Commit 8bf3d8e

Browse files
authored
Merge pull request #217 from cadenmyers13/tests-on-pr-wf
CI: Use `tests-on-pr.yml` from skpkg 0.3.0 and pip installing `gooey`
2 parents d016b99 + 24c43cb commit 8bf3d8e

File tree

2 files changed

+32
-46
lines changed

2 files changed

+32
-46
lines changed

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

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,16 @@
11
name: Tests on PR
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
workflow_dispatch:
96

107
jobs:
11-
validate:
12-
defaults:
13-
run:
14-
shell: bash -l {0}
15-
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Check out diffpy.labpdfproc repository
19-
uses: actions/checkout@v4
20-
21-
- name: Initialize miniconda
22-
uses: conda-incubator/setup-miniconda@v3
23-
with:
24-
activate-environment: test
25-
auto-update-conda: true
26-
environment-file: environment.yml
27-
auto-activate-base: false
28-
python-version: 3.13
29-
30-
- name: Conda config
31-
run: >-
32-
conda config --set always_yes yes
33-
--set changeps1 no
34-
35-
- name: Install diffpy.labpdfproc and requirements
36-
run: |
37-
conda install --file requirements/tests.txt
38-
conda install --file requirements/conda.txt
39-
pip install gooey
40-
python -m pip install . --no-deps
41-
42-
- name: Validate diffpy.labpdfproc
43-
run: |
44-
pytest --cov
45-
coverage report -m
46-
codecov
47-
48-
- name: Upload coverage to Codecov
49-
uses: codecov/codecov-action@v4
50-
with:
51-
verbose: true
52-
fail_ci_if_error: true
53-
token: ${{ secrets.CODECOV_TOKEN }}
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
10+
with:
11+
project: diffpy.labpdfproc
12+
c_extension: false
13+
headless: false
14+
run: pip install gooey
15+
secrets:
16+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

news/tests-on-pr-wf.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news added: Use the tests-on-pr.yml workflow template with pip install gooey
4+
5+
**Changed:**
6+
7+
* <news item>
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>

0 commit comments

Comments
 (0)