Skip to content

Commit

Permalink
add aiohttp and update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kiraware committed Jan 2, 2024
1 parent 4971aed commit 7d85328
Show file tree
Hide file tree
Showing 5 changed files with 459 additions and 46 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,19 @@ jobs:
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Activate virtual environment
run: source $VENV
- name: Lint with ruff
run: |
source $VENV
poetry run ruff check src
run: poetry run ruff check src
- name: Check code security with bandit
run: |
source $VENV
poetry run bandit -r src
run: poetry run bandit -r src
- name: Typing with mypy
run: |
source $VENV
poetry run mypy --check src
run: poetry run mypy --check src
- name: Doc format with docformatter
run: |
source $VENV
poetry run docformatter --check --black -r src
run: poetry run docformatter --check --black -r src
- name: Sort import with isort
run: |
source $VENV
poetry run isort --check src tests
run: poetry run isort --check src tests
- name: Format with black
run: |
source $VENV
poetry run black --check src tests
run: poetry run black --check src tests
- name: Test with pytest
run: |
source $VENV
poetry run pytest tests --cov=src
run: poetry run pytest tests --cov=src
32 changes: 10 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,25 @@ jobs:
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ matrix.poetry-version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Activate virtual environment
run: source $VENV
- name: Lint with ruff
run: |
source $VENV
poetry run ruff check src
run: poetry run ruff check src
- name: Check code security with bandit
run: |
source $VENV
poetry run bandit -r src
run: poetry run bandit -r src
- name: Typing with mypy
run: |
source $VENV
poetry run mypy --check src
run: poetry run mypy --check src
- name: Doc format with docformatter
run: |
source $VENV
poetry run docformatter --check --black -r src
run: poetry run docformatter --check --black -r src
- name: Sort import with isort
run: |
source $VENV
poetry run isort --check src tests
run: poetry run isort --check src tests
- name: Format with black
run: |
source $VENV
poetry run black --check src tests
run: poetry run black --check src tests
- name: Test with pytest
run: |
source $VENV
poetry run pytest tests --cov=src
run: poetry run pytest tests --cov=src
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ venv.bak/
.dmypy.json
dmypy.json

# npm
node_modules/

# Pyre type checker
.pyre/

Expand All @@ -252,6 +255,9 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff linter
.ruff_cache/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
Expand Down
Loading

0 comments on commit 7d85328

Please sign in to comment.