Skip to content

Commit

Permalink
Merge pull request #79 from aj3sh/commitlint
Browse files Browse the repository at this point in the history
ci: add commitlint
  • Loading branch information
sugat009 authored May 27, 2024
2 parents 8b2b57d + 7ddbcaf commit 72bb38d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Please mark the appropriate option below to describe the type of change your pul

## Checklist

- [ ] I have used [semantic commit messages](https://seesparkbox.com/foundry/semantic_commit_messages).
Examples: `"fix(google): Fixed foobar bug"`, `"feat(accounts): Added foobar feature"`.
- [ ] I have used pre-commit hooks.
- [ ] I have added/updated the necessary documentation on `README.md`.
- [ ] I have updated `CHANGELOG.md` for the significant changes.
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ jobs:
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Conventional Commitlint
uses: opensource-nepal/commitlint@v1
with:
verbose: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -30,9 +35,6 @@ jobs:
python -m pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run commitlint
uses: opensource-nepal/commitlint@v0.2.1

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -50,7 +52,7 @@ jobs:
coverage report
- name: Send coverage to CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ repos:
- pylint==2.17.4

- repo: https://github.com/opensource-nepal/commitlint
rev: v0.2.1
rev: v1.0.0
hooks:
- id: commitlint
- id: commitlint
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ make coverage-html

Before submitting your code please do the following steps:

1. Add any changes you want
1. Add tests for the new changes
1. Update the `CHANGELOG.md` file if necessary
1. Edit documentation if you have changed something significant
1. Add any changes you want.
1. Add tests for the new changes.
1. Update the `CHANGELOG.md` file if necessary.
1. Edit documentation (`README.md`) if you have changed something significant.
1. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
Examples: `feat: add JSON parser`, `feat(parser): add JSON parser`.

## Other help

Expand Down

0 comments on commit 72bb38d

Please sign in to comment.