1111 workflow_dispatch :
1212
1313jobs :
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- c_extension : true
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.10", "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 }}
0 commit comments