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

ci: add commitlint #79

Merged
merged 1 commit into from
May 27, 2024
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
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/[email protected]

- 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