Skip to content

Commit

Permalink
ci: add mypy test and semver (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbenbang authored Aug 13, 2023
1 parent f099e50 commit ee257ab
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new typings)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality not to work as expected)
32 changes: 32 additions & 0 deletions .github/workflows/mypy_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: mypy-tests
on: [pull_request]
jobs:
mypy:
name: runner / mypy
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
poetry-version: ["1.5.1"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: prepare pipx, poetry and dependencies
run: |
python -m pip install --user pipx
python -m pipx ensurepath
pipx install poetry=="${poetry_version}"
poetry install
poetry show
env:
poetry_version: ${{ matrix.poetry-version }}
- name: run mypy
run: |
poetry run mypy --version
poetry run mypy confluent_kafka-stubs
173 changes: 173 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"branches": "main",
"parserOpts": {
"revertPattern": "^revert\\s.(\\w*\\([\\w\\$\\.\\-\\* ]*\\)\\: .*).\\s*This reverts commit (\\w*)?"
},
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
},
"preset": "conventionalcommits",
"releaseRules": [
{
"release": "major",
"type": "*!"
},
{
"release": "minor",
"type": "feat"
},
{
"release": "patch",
"type": "perf"
},
{
"release": "patch",
"type": "build"
},
{
"release": "patch",
"type": "ops"
},
{
"release": "patch",
"type": "refactor"
},
{
"release": "patch",
"type": "ci"
},
{
"release": "patch",
"type": "hotfix"
},
{
"release": "patch",
"type": "fix"
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"githubUrl": "https://github.com/benbenbang"
}
]
],
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"section": ":zap: Breaking Changes",
"type": "*!"
},
{
"hidden": false,
"section": ":gift: Features",
"type": "feat"
},
{
"hidden": false,
"section": ":tools: Enhancement & Maintenance",
"type": "refactor"
},
{
"hidden": false,
"section": ":hotsprings: CI & Dev & Infra",
"type": "ci"
},
{
"hidden": false,
"section": ":hotsprings: CI & Dev & Infra",
"type": "ops"
},
{
"hidden": false,
"section": ":hotsprings: CI & Dev & Infra",
"type": "chore"
},
{
"hidden": false,
"section": ":fire: Hotfixes",
"type": "hotfix"
},
{
"hidden": false,
"section": ":beetle: Bug Fixes",
"type": "fix"
},
{
"hidden": false,
"section": ":track_previous: Reverts",
"type": "revert"
},
{
"hidden": true,
"type": "build"
},
{
"hidden": true,
"type": "wip"
},
{
"hidden": false,
"type": "docs"
},
{
"hidden": true,
"type": "test"
},
{
"hidden": true,
"type": "release"
}
]
},
"releaseRules": [
{
"release": "major",
"type": "feat"
},
{
"release": "patch",
"type": "perf"
},
{
"release": "patch",
"type": "build"
},
{
"release": "patch",
"type": "ops"
},
{
"release": "patch",
"type": "ci"
},
{
"release": "patch",
"type": "refactor"
},
{
"release": "patch",
"type": "chore"
},
{
"release": "patch",
"type": "hotfix"
},
{
"release": "patch",
"type": "fix"
}
],
"tagFormat": "${version}"
}
2 changes: 1 addition & 1 deletion confluent_kafka-stubs/cimpl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class KafkaError:
def retriable(self) -> bool: ...
def str(self) -> str: ...
def txn_requires_abort(self) -> bool: ...
def __eq__(self, other: object) -> bool: ...
def __eq__(self, other: "object") -> bool: ...
def __ge__(self, other: "KafkaError") -> bool: ...
def __gt__(self, other: "KafkaError") -> bool: ...
def __hash__(self) -> int: ...
Expand Down

0 comments on commit ee257ab

Please sign in to comment.