Skip to content

Workflows: Augment workflow to ensure failure with invalid change notes #7946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 11, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/check-change-note.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ on:
paths:
- "*/ql/src/**/*.ql"
- "*/ql/src/**/*.qll"
- "*/ql/lib/**/*.ql"
- "*/ql/lib/**/*.qll"
- "!**/experimental/**"
- "!ql/**"
- ".github/workflows/check-change-note.yml"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should change */ql/src/**/*.qll to */ql/**/*.qll (and same for .ql). Otherwise we're not running on changes that only affect the library packs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was committed accidentally. I think we should exclude tests and example packs from here. So, I will add a line like this: */ql/lib/**/*.qll. Same for *.ql. It's not really related to this change, but I'll add it anyway.

jobs:
check-change-note:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/validate-change-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Validate change notes

on:
push:
paths:
- "*/ql/*/change-notes/**/*"
- ".github/workflows/validate-change-notes.yml"
branches:
- main
- "rc/*"
pull_request:
paths:
- "*/ql/*/change-notes/**/*"
- ".github/workflows/validate-change-notes.yml"

jobs:
check-change-note:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql

- name: Fail if there are any errors with existing change notes

run: |
codeql pack release --groups cpp,csharp,java,javascript,python,ruby,-examples,-test,-experimental
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually fail the step if codeql returns non-zero? I thought you needed set -e to make that happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a workflow run that I intentionally failed. https://github.com/github/codeql/runs/5148220083?check_suite_focus=true It fails the job as well.