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
48 changes: 8 additions & 40 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,11 @@ on:

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

runs-on: macos-latest
steps:
- name: Check out diffpy.pdffit2
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches branches and tags

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

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

- name: Install diffpy.pdffit2 and docs requirements
run: |
conda install --file requirements/conda.txt
conda install --file requirements/docs.txt
conda install --file requirements/build.txt
python -m pip install . --no-deps

- name: build documents
run: make -C doc html

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
permissions:
contents: write
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: diffpy.pdffit2
c_extension: true
headless: false
python_version: 3.12
51 changes: 8 additions & 43 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,11 @@ on:

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

runs-on: ubuntu-latest
steps:
- name: Check out diffpy.pdffit2
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.12

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

- name: Install diffpy.pdffit2 and requirements
run: |
conda install --file requirements/conda.txt
conda install --file requirements/test.txt
conda install --file requirements/build.txt
python -m pip install . --no-deps


- name: Validate diffpy.pdffit2
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 }}
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.pdffi2
c_extension: false
headless: true
python_version: 3.12
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Loading