Skip to content

Commit 38a4889

Browse files
Merge branch 'main' into gui
2 parents c1d794d + 055b223 commit 38a4889

File tree

2 files changed

+91
-16
lines changed

2 files changed

+91
-16
lines changed

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

+48-8
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,51 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
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 }}
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+
pip install -r requirements/pip.txt
49+
python -m pip install . --no-deps
50+
51+
- name: Validate diffpy.labpdfproc
52+
run: |
53+
pytest --cov
54+
coverage report -m
55+
codecov
56+
57+
- name: Upload coverage to Codecov
58+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
59+
uses: codecov/codecov-action@v4
60+
env:
61+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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

+43-8
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,46 @@ on:
88
workflow_dispatch:
99

1010
jobs:
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 }}
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+
pip install -r requirements/pip.txt
39+
python -m pip install . --no-deps
40+
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 }}

0 commit comments

Comments
 (0)