Linters, Pytest conf
This commit is contained in:
parent
f0981730fd
commit
468d96bf6c
|
@ -0,0 +1,9 @@
|
|||
## PR Details
|
||||
|
||||
<!--
|
||||
Describe in details the feature or scenario that this PR is automating tests for.
|
||||
-->
|
||||
|
||||
## Issues reported:
|
||||
|
||||
<!-- Issues found while working for this PR -->
|
|
@ -0,0 +1,33 @@
|
|||
name: Code Linters
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Set up virtual environment
|
||||
run: |
|
||||
python -m venv .venv
|
||||
echo ".venv/bin" >> $GITHUB_PATH # Add virtualenv to PATH for subsequent steps
|
||||
|
||||
- name: Install dependencies based on requirements.txt
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
|
||||
- name: Run pre-commit hooks
|
||||
run: pre-commit run --all-files
|
|
@ -0,0 +1,11 @@
|
|||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.7.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: [--line-length=150]
|
||||
|
||||
- repo: https://github.com/RobertCraigie/pyright-python
|
||||
rev: v1.1.326
|
||||
hooks:
|
||||
- id: pyright
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"include": ["src", "tests"],
|
||||
"reportMissingImports": true,
|
||||
"reportOptionalMemberAccess": false,
|
||||
"reportGeneralTypeIssues": false,
|
||||
"reportInvalidStringEscapeSequence": false,
|
||||
"reportWildcardImportFromLibrary": false,
|
||||
"venvPath": ".",
|
||||
"venv": ".venv",
|
||||
"typeCheckingMode": "off"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
[pytest]
|
||||
addopts = -s --instafail --tb=short --color=auto
|
||||
log_level = DEBUG
|
||||
log_cli = True
|
||||
log_file = log/test.log
|
||||
log_cli_format = %(asctime)s %(name)s %(levelname)s %(message)s
|
||||
log_file_format = %(asctime)s %(name)s %(levelname)s %(message)s
|
||||
timeout = 300
|
Loading…
Reference in New Issue