|
11 | 11 | workflow_dispatch: |
12 | 12 |
|
13 | 13 | 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.pdfgui |
29 | | - uses: actions/checkout@v4 |
30 | | - |
31 | | - - name: Initialize miniconda |
32 | | - uses: conda-incubator/setup-miniconda@v3 |
33 | | - with: |
34 | | - activate-environment: test |
35 | | - miniforge-version: latest |
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.pdfgui and requirements |
46 | | - run: | |
47 | | - conda install --file requirements/test.txt |
48 | | - conda install wxpython diffpy.utils matplotlib-base |
49 | | - pip install diffpy.pdffit2==1.5.0rc1 |
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.pdfgui |
60 | | - run: | |
61 | | - if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then |
62 | | - export DISPLAY=:99 |
63 | | - fi |
64 | | - pytest --cov |
65 | | - coverage report -m |
66 | | - codecov |
67 | | -
|
68 | | - - name: Upload coverage to Codecov |
69 | | - if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION |
70 | | - uses: codecov/codecov-action@v4 |
71 | | - env: |
72 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 14 | + matrix-coverage: |
| 15 | + uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 |
| 16 | + with: |
| 17 | + project: diffpy.pdfgui |
| 18 | + c_extension: false |
| 19 | + headless: true |
| 20 | + secrets: |
| 21 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments