Skip to content

Commit

Permalink
Add CI to check for changelog update (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
PGijsbers authored Aug 4, 2022
1 parent d2247e5 commit b95c132
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Changelog

on:
pull_request:
branches:
- master
- main

jobs:
check-and-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Releases.rst Updated
run: |
git fetch origin master:master
updated_files=$(git diff master -- docs/source/releases.rst)
if [[ -z $updated_files ]]
then
exit 1
fi
- name: Thank you comment
uses: thollander/actions-comment-pull-request@v1
with:
comment_includes: "changelog"
message: |
Thank you for the pull request! :pray:
If CI reports any errors please address them.
If you believe the errors are unrelated to your PR, please state why.
This will make it easier for the maintainers to assess your PR :)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment PR
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v1
with:
comment_includes: "changelog" # To avoid creating additional comments
message: |
Please include the change for this PR in the changelog (`docs/source/releases.rst`).
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: pytest
on:
workflow_dispatch:

schedule:
- cron: "00 0 * * 1"
pull_request:

jobs:
unit:
Expand Down
6 changes: 6 additions & 0 deletions docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Maintenance:
- Drop support for Python 3.6 and 3.7
- Add support for Python 3.10
- Use pyproject.toml instead of setup.py
- Transition to Github CI, including:
- pytest on pull request
- pytest CRON job with prerelease versions
- doc build and deploy
- pre-commit check
- check for changelog

Bugfixes:
- #137: raise an output if ``output_directory`` is non-empty.
Expand Down

0 comments on commit b95c132

Please sign in to comment.