Skip to content

Commit 226839c

Browse files
committed
use centralized tests on pr workflow
1 parent b4ca076 commit 226839c

File tree

1 file changed

+8
-45
lines changed

1 file changed

+8
-45
lines changed

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

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,15 @@
11
name: Tests on PR
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- cookie
84
pull_request:
95
workflow_dispatch:
106

117
jobs:
12-
validate:
13-
defaults:
14-
run:
15-
shell: bash -l {0}
16-
17-
runs-on: ${{ matrix.os }}
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
22-
python-version: [3.11, 3.12, 3.13]
23-
24-
steps:
25-
- name: Check out diffpy.srreal
26-
uses: actions/checkout@v4
27-
28-
- name: Initialize miniconda
29-
uses: conda-incubator/setup-miniconda@v3
30-
with:
31-
auto-update-conda: true
32-
auto-activate-base: false
33-
python-version: ${{ matrix.python-version }}
34-
- name: Conda config
35-
run: |
36-
conda config --add channels conda-forge
37-
- name: Install diffpy.srreal and requirements
38-
run: |
39-
conda create -n test python=${{ matrix.python-version }} -y
40-
source $(conda info --base)/etc/profile.d/conda.sh
41-
conda activate test
42-
conda install pip -y
43-
conda config --set always_yes yes --set changeps1 no
44-
conda install --file requirements/conda.txt -y
45-
conda install --file requirements/tests.txt -y
46-
python -m pip install . --no-deps
47-
48-
- name: Validate diffpy.pdfgui
49-
run: |
50-
source $(conda info --base)/etc/profile.d/conda.sh
51-
conda activate test
52-
pytest tests
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
10+
with:
11+
project: diffpy.srreal
12+
c_extension: true
13+
headless: false
14+
secrets:
15+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)