Add cli #41
Workflow file for this run
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
--- | |
name: CI | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "!**/README.md" | |
pull_request: | |
branches: ["development"] | |
paths: | |
- "**/*.py" | |
- "!**/README.md" | |
workflow_dispatch: | |
jobs: | |
code-quality: | |
name: "python-code-quality" | |
strategy: | |
matrix: | |
python-version: [3.8.x] | |
poetry-version: [1.3.1] | |
runs-on: ubuntu-latest | |
#defaults: | |
# run: | |
# working-directory: cyborg_web | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: "Setup Python, Poetry and Dependencies" | |
uses: packetcoders/action-setup-cache-python-poetry@main | |
with: | |
python-version: ${{matrix.python-version}} | |
poetry-version: ${{matrix.poetry-version}} | |
- name: Format (chk) - black | |
run: poetry run black ./src ./tests | |
- name: Format (chk) - isort | |
run: poetry run isort ./src ./tests --check-only --profile black | |
- name: Format (chk) - autoflake | |
run: poetry run autoflake -r . --expand-star-imports --remove-unused-variables --remove-all-unused-imports | |
- name: Format (chk) - bandit | |
run: poetry run bandit -c pyproject.toml -r . | |
- name: Format (chk) - ruff | |
run: poetry run ruff format . --check | |
- name: Lint - flake8 | |
run: poetry run flake8 . | |
- name: Lint - ruff | |
run: ruff check . | |
- name: Lint - yamllint | |
run: poetry run yamllint src/ -c .yamllint | |
- name: Type check - mypy | |
run: poetry run mypy ./src ./tests --config-file pyproject.toml | |
test: | |
name: "python-tests" | |
needs: "code-quality" | |
strategy: | |
matrix: | |
python-version: [3.8.x] | |
poetry-version: [1.3.1] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: "Setup Python, Poetry and Dependencies" | |
uses: packetcoders/action-setup-cache-python-poetry@main | |
with: | |
python-version: ${{matrix.python-version}} | |
poetry-version: ${{matrix.poetry-version}} | |
- name: Test | |
run: poetry run pytest tests -vvv --tb=short |