-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
432 additions
and
16 deletions.
There are no files selected for viewing
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,39 @@ | ||
name: lint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
black: | ||
name: Check code formatting with black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Extract black version from requirements-dev.txt | ||
id: black_version | ||
run: echo "::set-output name=version::$(grep -oP 'black==\K[^"]+' requirements-dev.txt)" | ||
- uses: psf/black@stable | ||
with: | ||
src: ./src | ||
version: ${{ steps.back_version.outputs.version }} | ||
ruff: | ||
name: Check code formatting with ruff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Extract ruff version from requirements-dev.txt | ||
id: ruff_version | ||
run: echo "::set-output name=version::$(grep -oP 'ruff==\K[^"]+' requirements-dev.txt)" | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
version: ${{ steps.ruff_version.outputs.version }} | ||
mypy: | ||
name: Check type hints with mypy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- run: | | ||
pip install -r requirements-dev.txt | ||
mypy src/ |
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,23 @@ | ||
name: tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: Run tests with pytest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements-dev.txt | ||
- name: Test with tox | ||
run: tox |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
black==23.10.0 | ||
mypy==1.6.1 | ||
pytest==7.4.2 | ||
ruff==0.1.1 | ||
tox==4.11.3 | ||
tox-gh-actions==3.1.3 |
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,3 +1,6 @@ | ||
from __future__ import annotations | ||
|
||
|
||
class ClamdException(Exception): | ||
pass | ||
|
||
|
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.