diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7b2bd2f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + python-version: ["3.11", "3.12"] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync --all-extras + + - name: Run tests + run: uv run pytest tests/ -v + + - name: Run ruff linting + run: uv run ruff check src/ tests/ diff --git a/README.md b/README.md index ca68090..f368d09 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # runcue +[![Tests](https://github.com/somebox/runcue/actions/workflows/test.yml/badge.svg)](https://github.com/somebox/runcue/actions/workflows/test.yml) + ![runcue logo](./docs/images/runcue-logo-sm.png) A Python library for coordinating work across rate-limited services. Define your tasks, tell runcue when they're ready to run, and let it handle the scheduling and throttling.