Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieqiong committed Sep 12, 2024
1 parent 5923fa2 commit 4d213a0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 173 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Check News Item
on:
pull_request_target:
branches:
- main
jobs:
build:
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@main
with:
project: diffpy.pdffit2
55 changes: 9 additions & 46 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,17 @@
name: Gather coverage report and upload to codecov

on:
push:
branches:
- main
- main
release:
types:
- prereleased
- published
workflow_dispatch:

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

- prereleased
- published
workflow_dispatch: null
jobs:
coverage:
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

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no
- name: Install diffpy.pdffit2 and requirements
run: |
conda install --file requirements/run.txt
conda install --file requirements/test.txt
conda install --file requirements/build.txt
python -m pip install -r requirements/pip.txt
python -m pip install -e . --no-deps
- name: Validate diffpy.pdffit2
run: |
coverage run -m pytest -vv -s
coverage report -m
codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: Billingegroup/release-scripts/.github/workflows/_codecov.yml@main
with:
project: diffpy.pdffit2
c_extension: true
headless: false
48 changes: 6 additions & 42 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,12 @@
name: Build and Deploy Documentation

on:
release:
types:
- published
workflow_dispatch:

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

- published
workflow_dispatch: null
jobs:
docs:
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: build
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no
- name: Install diffpy.pdffit2 and build requirements
run: |
conda install --file requirements/build.txt
conda install --file requirements/run.txt
conda install --file requirements/docs.txt
python -m pip install -r requirements/pip.txt
python -m pip install -e . --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
uses: Billingegroup/release-scripts/.github/workflows/_docs.yml@main
with:
project: diffpy.pdffit2
c_extension: true
45 changes: 8 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
name: Test

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

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

- main
pull_request: null
workflow_dispatch: null
jobs:
validate:
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

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no
- name: Install diffpy.pdffit2 and requirements
run: |
conda install --file requirements/run.txt
conda install --file requirements/test.txt
conda install --file requirements/build.txt
python -m pip install -r requirements/pip.txt
python -m pip install -e . --no-deps
- name: Validate diffpy.pdffit2
run: python -m pytest
uses: Billingegroup/release-scripts/.github/workflows/_main.yml@main
with:
project: diffpy.pdffit2
c_extension: true
headless: false
48 changes: 0 additions & 48 deletions .github/workflows/matrix.yml

This file was deleted.

0 comments on commit 4d213a0

Please sign in to comment.