From 9b56545d59d6d35511fe913d64250b4753f8f451 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 12 Sep 2024 14:50:20 -0400 Subject: [PATCH 1/4] Use centralized workflow files by Tieqiong --- .github/workflows/check-news-item.yml | 10 +++++ .github/workflows/codecov.yml | 54 +++++---------------------- .github/workflows/docs.yml | 48 +++--------------------- .github/workflows/main.yml | 44 ++++------------------ 4 files changed, 33 insertions(+), 123 deletions(-) create mode 100644 .github/workflows/check-news-item.yml diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml new file mode 100644 index 00000000..ed0b886f --- /dev/null +++ b/.github/workflows/check-news-item.yml @@ -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.utils diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e8bae0c8..b6068eea 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,53 +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.utils - 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.utils and requirements - run: | - conda install --file requirements/run.txt - conda install --file requirements/test.txt - python -m pip install -r requirements/pip.txt - python -m pip install . --no-deps - - - name: Validate diffpy.utils - 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.utils + c_extension: false + headless: false diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7b3ac4ce..40e87f95 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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.utils - 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.utils 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 . --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.utils + c_extension: false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb0cb88b..e50e9cfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,42 +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.utils - 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.utils and requirements - run: | - conda install --file requirements/run.txt - conda install --file requirements/test.txt - python -m pip install -r requirements/pip.txt - python -m pip install . --no-deps - - - name: Validate diffpy.utils - run: python -m pytest + uses: Billingegroup/release-scripts/.github/workflows/_main.yml@main + with: + project: diffpy.utils + c_extension: false + headless: false From 3d3f0bb4b508208277b0e12000e189ab19975020 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 12 Sep 2024 15:34:26 -0400 Subject: [PATCH 2/4] Remove null --- .github/workflows/codecov.yml | 2 +- .github/workflows/docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index b6068eea..1dde0237 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -7,7 +7,7 @@ on: types: - prereleased - published - workflow_dispatch: null + workflow_dispatch: jobs: coverage: uses: Billingegroup/release-scripts/.github/workflows/_codecov.yml@main diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 40e87f95..841bb729 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ on: release: types: - published - workflow_dispatch: null + workflow_dispatch: jobs: docs: uses: Billingegroup/release-scripts/.github/workflows/_docs.yml@main From d9b39df080bb66105c8e259b4a08bbf8f7795ed3 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 12 Sep 2024 15:37:21 -0400 Subject: [PATCH 3/4] Remove null --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e50e9cfb..efee53f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,8 +3,8 @@ on: push: branches: - main - pull_request: null - workflow_dispatch: null + pull_request: + workflow_dispatch: jobs: validate: uses: Billingegroup/release-scripts/.github/workflows/_main.yml@main From cd388dd7e34bbf9d8132047152f14904cf220cb9 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Thu, 12 Sep 2024 15:39:22 -0400 Subject: [PATCH 4/4] Add news --- news/central-ci.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/central-ci.rst diff --git a/news/central-ci.rst b/news/central-ci.rst new file mode 100644 index 00000000..7c1e46a2 --- /dev/null +++ b/news/central-ci.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* central GitHub workflow for all CI runs + +**Security:** + +*