-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pw to auto-install tools and fix type hints (#91)
* use pw to auto-install tools and fix type hints * use pytest as testrunner * use ruff as formatter and linter + fix trivial lint errors * replace setuptools with flit and add build action * remove mypy type checking from pre-commit hook because it take too long * bumped version --------- Co-authored-by: ihoubr <[email protected]>
- Loading branch information
Showing
16 changed files
with
803 additions
and
722 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: pybreaker test matrix | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Cache pyprojectx | ||
uses: actions/cache@v4 | ||
with: | ||
key: ${{ hashFiles('pyproject.toml') }}-${{ matrix.python-version }}-venvs | ||
path: | | ||
.pyprojectx | ||
venv | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Test and build | ||
run: | | ||
./pw lint | ||
./pw type-check | ||
./pw test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
|
||
- repo: local | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.971 | ||
- id: format | ||
name: format | ||
entry: pw format | ||
language: script | ||
types: [ python ] | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: mypy | ||
- id: lint | ||
name: lint | ||
entry: pw lint | ||
language: script | ||
types: [ python ] | ||
pass_filenames: false | ||
additional_dependencies: | ||
- "types-redis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.