Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 9 additions & 46 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,16 @@
name: Tests on PR

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
validate:
defaults:
run:
shell: bash -l {0}

runs-on: ubuntu-latest
steps:
- name: Check out diffpy.labpdfproc repository
uses: actions/checkout@v4

- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
python-version: 3.13

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no

- name: Install diffpy.labpdfproc and requirements
run: |
conda install --file requirements/tests.txt
conda install --file requirements/conda.txt
pip install gooey
python -m pip install . --no-deps

- name: Validate diffpy.labpdfproc
run: |
pytest --cov
coverage report -m
codecov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
tests-on-pr:
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.labpdfproc
c_extension: false
headless: false
run: pip install gooey
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
23 changes: 23 additions & 0 deletions news/tests-on-pr-wf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: Use the tests-on-pr.yml workflow template with pip install gooey

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading