Skip to content

Commit f6c2aaf

Browse files
authored
Merge pull request #115 from Tieqiong/wf
ci: use integrated wheel build and matrix test
2 parents 026b4d8 + 3f64916 commit f6c2aaf

File tree

3 files changed

+32
-140
lines changed

3 files changed

+32
-140
lines changed

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

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,12 @@ 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"]
25-
env:
26-
LATEST_PYTHON_VERSION: "3.12"
27-
steps:
28-
- name: Check out diffpy.pdffit2
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.pdffit2 and requirements
46-
run: |
47-
conda install --file requirements/conda.txt
48-
conda install --file requirements/test.txt
49-
conda install --file requirements/build.txt
50-
python -m pip install . --no-deps
51-
52-
- name: Start Xvfb for ubuntu-latest only
53-
if: matrix.os == 'ubuntu-latest'
54-
run: |
55-
sudo apt-get install -y xvfb
56-
export DISPLAY=:99
57-
Xvfb :99 -screen 0 1024x768x16 &
58-
59-
- name: Validate diffpy.pdfffit2
60-
run: |
61-
pytest --cov
62-
coverage report -m
63-
codecov
64-
65-
- name: Upload coverage to Codecov
66-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
67-
uses: codecov/codecov-action@v4
68-
env:
69-
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.pdffit2
18+
python_versions: "3.11, 3.12"
19+
c_extension: true
20+
headless: false
21+
secrets:
22+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/wheel.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

news/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: modification on CI workflow
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)