Skip to content

Commit c280931

Browse files
update the test-on-pr and matrix-test CI files
1 parent 7f264d2 commit c280931

File tree

2 files changed

+16
-93
lines changed

2 files changed

+16
-93
lines changed

.github/workflows/matrix-and-codecov-on-merge-to-main.yml

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,11 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
coverage:
15-
defaults:
16-
run:
17-
shell: bash -l {0}
18-
19-
runs-on: ${{ matrix.os }}
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
24-
python-version: ["3.11", "3.12", "3.13"]
25-
env:
26-
LATEST_PYTHON_VERSION: "3.13"
27-
steps:
28-
- name: Check out diffpy.labpdfproc
29-
uses: actions/checkout@v4
30-
31-
- name: Initialize miniconda
32-
uses: conda-incubator/setup-miniconda@v3
33-
with:
34-
activate-environment: test
35-
auto-update-conda: true
36-
environment-file: environment.yml
37-
auto-activate-base: false
38-
python-version: ${{ matrix.python-version }}
39-
40-
- name: Conda config
41-
run: >-
42-
conda config --set always_yes yes
43-
--set changeps1 no
44-
45-
- name: Install diffpy.labpdfproc and requirements
46-
run: |
47-
conda install --file requirements/test.txt
48-
conda install --file requirements/conda.txt
49-
pip install gooey
50-
python -m pip install . --no-deps
51-
52-
- name: Validate diffpy.labpdfproc
53-
run: |
54-
pytest --cov
55-
coverage report -m
56-
codecov
57-
58-
- name: Upload coverage to Codecov
59-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
60-
uses: codecov/codecov-action@v4
61-
env:
62-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
matrix-coverage:
15+
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.labpdfproc
18+
c_extension: false
19+
headless: false
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,11 @@ on:
88
workflow_dispatch:
99

1010
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/test.txt
38-
conda install --file requirements/conda.txt
39-
pip install gooey
40-
python -m pip install . --no-deps
41-
42-
43-
- name: Validate diffpy.labpdfproc
44-
run: |
45-
pytest --cov
46-
coverage report -m
47-
codecov
48-
49-
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v4
51-
with:
52-
verbose: true
53-
fail_ci_if_error: true
54-
token: ${{ secrets.CODECOV_TOKEN }}
11+
tests-on-pr:
12+
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
13+
with:
14+
project: diffpy.labpdfproc
15+
c_extension: false
16+
headless: false
17+
secrets:
18+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)