Skip to content

feat(API): add queue API #844

feat(API): add queue API

feat(API): add queue API #844

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
workflow_call:
# Set default permissions for all jobs
permissions:
contents: read # Needed to check out code
checks: write # Needed to report test results
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
# Use the official Python action to set up Python because it is faster
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: API Doc check
run: make openapi-check
- name: Run tests
run: make test
build-package:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uv build --wheel --out-dir test-build
- name: Upload built package
uses: actions/upload-artifact@v4
with:
name: built-package
path: test-build/*.whl
test-package:
needs: build-package
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.12
- 3.13
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
tests/smoke.sh
uv.lock
sparse-checkout-cone-mode: false
- name: Download built package
uses: actions/download-artifact@v4
with:
name: built-package
path: test-build
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Extract path to wheel
id: wheel_path
run: echo "wheel_path=$(ls test-build/*.whl)" >> $GITHUB_OUTPUT
# This is equivalent to `pipx install --include-deps, but faster
- name: Install wheel
run: uv tool install "${{ steps.wheel_path.outputs.wheel_path }}"
- name: Run simple version command test
run: kodit version
- name: Delete kodit data_dir
run: rm -rf ${HOME}/.kodit
- name: Run smoke test
run: ./tests/smoke.sh