diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml new file mode 100644 index 0000000..7e66c78 --- /dev/null +++ b/.github/workflows/cli.yml @@ -0,0 +1,52 @@ +name: cli + +on: + push: + branches: [main] + paths: + - "cli/**" + - ".github/workflows/cli.yml" + pull_request: + paths: + - "cli/**" + - ".github/workflows/cli.yml" + +# Cancel in-progress runs on the same PR when a new push arrives — saves runner minutes. +concurrency: + group: cli-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + quality: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.12", "3.14"] + + defaults: + run: + working-directory: cli + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: cli/pyproject.toml + + - name: Install dependencies + run: pip install -e ".[dev]" + + - name: Ruff (lint + import order) + run: ruff check src tests + + - name: Mypy (type check) + run: mypy src + + - name: Pytest (unit tests) + run: pytest diff --git a/cli/README.md b/cli/README.md index 07aed73..88e9b74 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1,5 +1,7 @@ # TaskFlow CLI +[![cli](https://github.com/el-amin-dev/taskflow/actions/workflows/cli.yml/badge.svg)](https://github.com/el-amin-dev/taskflow/actions/workflows/cli.yml) + Command-line client for [TaskFlow](https://github.com/el-amin-dev/taskflow). Built with Typer + httpx. Single-use refresh tokens with file-lock theft protection, atomic 0600 credential storage, scriptable exit codes,