Skip to content

Commit a3e5da1

Browse files
committed
Use py 3.12 for test on pr
1 parent 8a05f92 commit a3e5da1

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

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

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,47 @@ 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.pdffit2
15-
c_extension: true
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.pdffit2
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.12
29+
30+
- name: Conda config
31+
run: >-
32+
conda config --set always_yes yes
33+
--set changeps1 no
34+
35+
- name: Install diffpy.pdffit2 and requirements
36+
run: |
37+
conda install --file requirements/conda.txt
38+
conda install --file requirements/test.txt
39+
conda install --file requirements/build.txt
40+
python -m pip install . --no-deps
41+
42+
43+
- name: Validate diffpy.pdffit2
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 }}

0 commit comments

Comments
 (0)