Skip to content
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

chore: allow test to pass even if commit name is not good #856

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Changes from 2 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
44 changes: 4 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,10 @@ jobs:
commit-lint:
runs-on: ubuntu-latest
steps:
- name: find the prev warning if exist
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "bad commit message"
- name: Delete comment if exist
if: ${{ steps.fc.outputs.comment-id != 0 }}
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: ${{ steps.fc.outputs.comment-id }},
})
- uses: actions/checkout@v2
- uses: actions/checkout@v2.5.0
with:
fetch-depth: 0
- run: 'echo "module.exports = {extends: [''@commitlint/config-conventional'']}" > commitlint.config.js'
- uses: wagoid/commitlint-github-action@v1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: if lint failed
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Thanks for your contribution :heart:
:broken_heart: Unfortunately, this PR has one ore more **bad commit messages**, it can not be merged. To fix this problem, please refer to:
- [Commit Message Guideline for the First Time Contributor](https://github.com/jina-ai/jina/issues/553)
- [Contributing Guideline](https://github.com/jina-ai/jina/blob/master/CONTRIBUTING.md)

Note, other CI tests will *not* *start* until the commit messages get fixed.

This message will be deleted automatically when the commit messages get fixed.
reaction-type: "eyes"
numb3r3 marked this conversation as resolved.
Show resolved Hide resolved
- uses: wagoid/commitlint-github-action@v4

lint-flake-8:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,7 +48,7 @@ jobs:

prep-testbed:
runs-on: ubuntu-latest
needs: [commit-lint, lint-flake-8, check-black]
needs: [lint-flake-8, check-black]
steps:
- uses: actions/checkout@v2
- id: set-matrix
Expand Down Expand Up @@ -187,7 +151,7 @@ jobs:

# just for blocking the merge until all parallel core-test are successful
success-all-test:
needs: [core-test, gpu-test]
needs: [commit-lint, core-test, gpu-test]
if: always()
runs-on: ubuntu-latest
steps:
Expand Down