diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index db5cacf..6f96ab7 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -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 }} diff --git a/news/tests-on-pr-wf.rst b/news/tests-on-pr-wf.rst new file mode 100644 index 0000000..2dfcfe2 --- /dev/null +++ b/news/tests-on-pr-wf.rst @@ -0,0 +1,23 @@ +**Added:** + +* No news added: Use the tests-on-pr.yml workflow template with pip install gooey + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*