Skip to content

Commit 1553ad8

Browse files
committed
revert back tests-on-pr
1 parent 9febcfa commit 1553ad8

File tree

1 file changed

+46
-8
lines changed

1 file changed

+46
-8
lines changed

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

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,53 @@
11
name: Tests on PR
22

33
on:
4+
push:
5+
branches:
6+
- main
47
pull_request:
58
workflow_dispatch:
69

710
jobs:
8-
tests-on-pr:
9-
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
10-
with:
11-
project: diffpy.labpdfproc
12-
c_extension: false
13-
headless: false
14-
secrets:
15-
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/tests.txt
38+
conda install --file requirements/conda.txt
39+
pip install gooey
40+
python -m pip install . --no-deps
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)