Skip to content

Commit 26a8a01

Browse files
committed
use tests-on-pr workflow from skpkg 0.3.0
1 parent d016b99 commit 26a8a01

File tree

1 file changed

+9
-46
lines changed

1 file changed

+9
-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 }}

0 commit comments

Comments
 (0)