From f40d72b7caed7ade15558db75a0634fae3548c46 Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Thu, 16 Jul 2026 03:16:37 -0300 Subject: [PATCH] ci: add test/lint/typecheck workflows Closes #45 Co-authored-by: Cursor --- .github/workflows/lint.yml | 19 +++++++++++++++++++ .github/workflows/test.yml | 20 ++++++++++++++++++++ .github/workflows/type-check.yml | 18 ++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/type-check.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..1a7eec9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Lint +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + - uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - run: uv sync --group dev + - run: uv run ruff check . + - run: uv run ruff format --check . diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b8001b1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Tests +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + - uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - run: uv sync --group dev + - run: uv run pytest --cov --cov-report=term-missing diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml new file mode 100644 index 0000000..2d3e1b9 --- /dev/null +++ b/.github/workflows/type-check.yml @@ -0,0 +1,18 @@ +name: Typecheck +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: +jobs: + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + - uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - run: uv sync --group dev + - run: uv run pyright